X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fc-call.lisp;h=4bcfd03a0bc70ef19ed00155710e3b89ee5d93bd;hb=93be0089fe7b2a9e34bf1cb6da9fe6e902769f5e;hp=278c950fb42b42609ed42020a63bf32517abd9b1;hpb=7fb597b585fc715537ea644f7d84440eca217ca1;p=sbcl.git diff --git a/src/compiler/x86/c-call.lisp b/src/compiler/x86/c-call.lisp index 278c950..4bcfd03 100644 --- a/src/compiler/x86/c-call.lisp +++ b/src/compiler/x86/c-call.lisp @@ -439,7 +439,16 @@ pointer to the arguments." (inst add eax 16) ; arguments (inst push eax) ; arg1 (inst push (ash index 2)) ; arg0 - (inst push (get-lisp-obj-address #'enter-alien-callback)) ; function + + ;; Indirect the access to ENTER-ALIEN-CALLBACK through + ;; the symbol-value slot of SB-ALIEN::*ENTER-ALIEN-CALLBACK* + ;; to ensure it'll work even if the GC moves ENTER-ALIEN-CALLBACK. + ;; Skip any SB-THREAD TLS magic, since we don't expecte anyone + ;; to rebind the variable. -- JES, 2006-01-01 + (inst mov eax (+ nil-value (static-symbol-offset + 'sb!alien::*enter-alien-callback*))) + (loadw eax eax symbol-value-slot other-pointer-lowtag) + (inst push eax) ; function (inst mov eax (foreign-symbol-address "funcall3")) (inst call eax) ;; now put the result into the right register