facebook / facebook/hermes

Compiler memory exhaustion error when compiling nested try/finally

Open
#372 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.