aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_guard.c
AgeCommit message (Collapse)Author
2010-01-19Merge branch 'bg/compiler-beam_validator' into ccase/r13b04_devErlang/OTP
* bg/compiler-beam_validator: beam_validator: fix incorrect assumptions about GC guard BIFs OTP-8378 In rare circumstances when using garbaging collecting guard BIFs, the validation pass (beam_validator) would signal that the code was unsafe, when it in fact was correct. (Thanks to Kiran Khaladkar.)
2010-01-15beam_validator: fix incorrect assumptions about GC guard BIFsBjörn Gustavsson
The beam_validator pass incorrectly assumes that a GC guard BIF (such as length/1) may first do a garbage collection and then fail. That assumption is not correct (guards BIF only do garbage collection when it is known that the BIF call will succeed), and will cause the compiler to reject valid programs. Modify the beam_validator to assume that if the branch is taken for a gc_bif instruction, all registers are unchanged and no garbage collection has occurred. Also add a comment in the emulator about that assumption.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP