]> gitweb.factorcode.org Git - factor.git/commitdiff
cpu.x86.bootstrap: don't safepoint in a safepoint
authorJoe Groff <arcata@gmail.com>
Fri, 4 Nov 2011 03:19:01 +0000 (20:19 -0700)
committerJoe Groff <arcata@gmail.com>
Fri, 4 Nov 2011 03:19:38 +0000 (20:19 -0700)
Safepointing in the signal-handler primitive causes a crash if the safepoint is guarded and the signal being handled was raised by a safepoint. Put our own RET in the subprimitive to bail out before the standard epilog gets written out. This tentatively appears to fix #349.

basis/cpu/x86/bootstrap.factor

index 570c7c87c50fea2808c50dc07e18b071be44f463..fc80a75e8729aa2a36d8556346143d5f9546c0b5 100644 (file)
@@ -112,6 +112,7 @@ big-endian off
     temp0 vm-reg vm-signal-handler-addr-offset [+] MOV
     temp0 CALL
     frame-size jit-signal-handler-epilog
+    0 RET
 ] \ signal-handler define-sub-primitive
 
 : leaf-frame-size ( -- n ) 4 bootstrap-cells ;