diff options
author | Björn Gustavsson <[email protected]> | 2018-02-28 06:29:23 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-03-02 12:56:35 +0100 |
commit | e5f5bebc9982ea15652dc97711b32348973905b4 (patch) | |
tree | c763bbd02336468b86b329db0c5c56a1dedeb439 /lib/compiler/internal_doc | |
parent | 478b43211bbe96018b63cbf6c6d567550a6e8a2c (diff) | |
download | otp-e5f5bebc9982ea15652dc97711b32348973905b4.tar.gz otp-e5f5bebc9982ea15652dc97711b32348973905b4.tar.bz2 otp-e5f5bebc9982ea15652dc97711b32348973905b4.zip |
beam_block: Fix unsafe sinking of get_tuple_element/3
In the following code:
{get_tuple_element,{x,0},0,{x,1}}.
{put_tuple,2,{x,1}}.
{put,{atom,badmap}}.
{put,{x,0}}.
{move,{x,1},{x,0}}.
beam_block would move the get_tuple_element/3 instruction and eliminate the
move/2 instruction:
{put_tuple,2,{x,1}}.
{put,{atom,badmap}}.
{put,{x,0}}.
{get_tuple_element,{x,0},0,{x,0}}.
That is not correct, since the result of the tuple building in {x,1} is
now ignored.
Diffstat (limited to 'lib/compiler/internal_doc')
0 files changed, 0 insertions, 0 deletions