Compiler memory exhaustion error when compiling nested try/finally
Open
bug
- Dominant language
- JavaScript
- Stars
- 11.3k
- Forks
- 859
- Avg merge
- 1h 30m
- Merged PRs (30d)
- 3
Description
## Bug Description
When running hermes $JSFILE with the crafted JSFILE, an unlimited memory allocation bug is triggered.
Hermes version: git dde6dce
React Native version (if any):
Android version (if any):
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64): x86_64
## Steps To Reproduce
1. Run ./hermes test.js
Please find test.js in the attachment test.zip.
2. If we limit the memory to 500M, it throws the bad_alloc exception.
If the memory is not limited, it keeps eating memories until the machine does not respond.
[test.zip](https://github.com/facebook/hermes/files/5300634/test.zip)
Contributor guide
Assessment
This issue has not been assessed yet.