diff options
| author | Francis Bogsanyi <[email protected]> | 2016-11-17 12:59:27 -0500 |
|---|---|---|
| committer | Bouke van der Bijl <[email protected]> | 2016-11-24 10:32:34 -0500 |
| commit | 964427f82c5a8556daf4448b47cc65fb6d2a94b8 (patch) | |
| tree | d6f3ce9ecaf598b76a70e80e58e5af348a9f51ef /test | |
| parent | a630c4f413f6af764e68210430e8b61a435d38d7 (diff) | |
| download | mruby-964427f82c5a8556daf4448b47cc65fb6d2a94b8.tar.gz mruby-964427f82c5a8556daf4448b47cc65fb6d2a94b8.zip | |
Fix unsafe peephole optimization
Reported by https://hackerone.com/dkasak
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/codegen.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/t/codegen.rb b/test/t/codegen.rb new file mode 100644 index 000000000..f910d37fb --- /dev/null +++ b/test/t/codegen.rb @@ -0,0 +1,11 @@ +## +# Codegen tests + +assert('peephole optimization does not eliminate move whose result is reused') do + assert_raise LocalJumpError do + def method + yield + end + method(&a &&= 0) + end +end |
