diff options
author | Björn Gustavsson <[email protected]> | 2009-12-10 21:18:39 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2009-12-10 21:43:08 +0100 |
commit | af198c489a7ab431fd1e2b52d16e8e13525915f7 (patch) | |
tree | db869146ecc862955dfb306292a42c8ae4b8c507 /bootstrap/lib/stdlib/ebin/ets.beam | |
parent | 9855ed863b58f7325f39b00c60813198ec41f528 (diff) | |
download | otp-af198c489a7ab431fd1e2b52d16e8e13525915f7.tar.gz otp-af198c489a7ab431fd1e2b52d16e8e13525915f7.tar.bz2 otp-af198c489a7ab431fd1e2b52d16e8e13525915f7.zip |
Fix crash in beam_bool
The following code crashes beam_bool:
bad(XDo1, XDo2, Do3) ->
Do1 = (XDo1 =/= []),
Do2 = (XDo2 =/= []),
if Do1 =:= true;
Do1 =:= false, Do2 =:= false, Do3 =:= delete ->
no
end.
(Reported by Simon Cornish; minimized by Kostis Sagonas.)
For the moment fix the bug in the simplest and safest way possible
(basically, instead of crashing just don't do the optimization).
In a future major release (e.g. R14), the following improvements
could be considered:
* In beam_bool, it should be possible to move the Do1 and Do2
expressions to the pre-block and still optimize the expression
in the 'if' statement.
* In sys_core_fold, it should be possible to eliminate the
try/catch around the guard expression in the 'if', because
none of the guard tests can actually fail.
Diffstat (limited to 'bootstrap/lib/stdlib/ebin/ets.beam')
0 files changed, 0 insertions, 0 deletions