diff options
author | Björn Gustavsson <[email protected]> | 2016-08-01 17:06:40 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-08-05 10:58:12 +0200 |
commit | 921cf991e09698d63d0f4f9a20bf2cfc23b2e896 (patch) | |
tree | 7513a85a22254cedc97bf95d4fdb64a61166cf53 /bootstrap/lib/kernel/ebin/application_master.beam | |
parent | 6dcf9c56c648bb6fa2f0e27bdf6429eab23fdd8c (diff) | |
download | otp-921cf991e09698d63d0f4f9a20bf2cfc23b2e896.tar.gz otp-921cf991e09698d63d0f4f9a20bf2cfc23b2e896.tar.bz2 otp-921cf991e09698d63d0f4f9a20bf2cfc23b2e896.zip |
beam_block: Fix potentially unsafe optimization in move_allocates/1
beam_block has an optimization that only is safe when it is applied
immediately after code generation. That is pointed out in a comment:
NOTE: Moving allocation instructions is only safe because it is done
immediately after code generation so that we KNOW that if {x,X} is
initialized, all x registers with lower numbers are also initialized.
That assumption may not be true after other optimizations, such as
the beam_utils:live_opt/1 optimization.
The new beam_reorder pass added in OTP 19 runs before beam_block.
Therefore, the optimization is potentially unsafe. The optimization
is also unsafe if compilation is started from assembly code in a
.S file.
Rewrite the optimization to make it safe. See the newly added comment
for details.
ERL-202
Diffstat (limited to 'bootstrap/lib/kernel/ebin/application_master.beam')
0 files changed, 0 insertions, 0 deletions