aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_x86_glue.S
diff options
context:
space:
mode:
authorPaul Guyot <[email protected]>2010-07-17 14:50:53 +0200
committerBjörn Gustavsson <[email protected]>2010-09-06 13:45:29 +0200
commit8bbcecd938f46127bc40ff7aed91d4e519d0cd5b (patch)
tree69a5542578ac615a6f5fbaaf4146467d59910e7a /erts/emulator/hipe/hipe_x86_glue.S
parentc4b4edaaf03ac12e12080cb4a3768edbb6ecf77d (diff)
downloadotp-8bbcecd938f46127bc40ff7aed91d4e519d0cd5b.tar.gz
otp-8bbcecd938f46127bc40ff7aed91d4e519d0cd5b.tar.bz2
otp-8bbcecd938f46127bc40ff7aed91d4e519d0cd5b.zip
Fix call to erts_gc_after_bif_call in hipe glue
R12B-0 changed the signature of erts_gc_after_bif_call and it now takes 4 parameters instead of 2 in R11B-5. Yet, the glue code was not updated accordingly. As a result, the function erts_gc_after_bif_call was called with garbage and would randomly cause a crash later in the garbage collector code. The fix consists in passing NULL and 0 for the third and fourth parameters, since there is no term to add to rootset, recovering the behaviour of R11B-5 (see otp_src_R11B-5/erts/emulator/beam/erl_gc.c, line 314). (Includes assembly language fixes and code style improvements suggested by Mikael Pettersson.)
Diffstat (limited to 'erts/emulator/hipe/hipe_x86_glue.S')
-rw-r--r--erts/emulator/hipe/hipe_x86_glue.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/hipe/hipe_x86_glue.S b/erts/emulator/hipe/hipe_x86_glue.S
index 2f7dff39f5..43392111fe 100644
--- a/erts/emulator/hipe/hipe_x86_glue.S
+++ b/erts/emulator/hipe/hipe_x86_glue.S
@@ -320,11 +320,13 @@ nbif_3_gc_after_bif:
.align 4
.gc_after_bif:
movl %edx, P_NARITY(P)
- subl $(16-4), %esp
+ subl $(32-4), %esp
movl P, (%esp)
movl %eax, 4(%esp)
+ movl $0, 8(%esp) # Pass NULL in regs
+ movl $0, 12(%esp) # Pass 0 in arity
call CSYM(erts_gc_after_bif_call)
- addl $(16-4), %esp
+ addl $(32-4), %esp
movl $0, P_NARITY(P)
ret