Open Ye0nny opened 1 month ago
Thank you for reporting this! We looked into it - this is a Hermes bug related to (the lack of) TDZ. Notably it is not present in our next major version (Static Hermes). We are currently reviewing our options for addressing it.
Bug Description
Hermes git revision (if applicable): https://github.com/facebook/hermes/commit/75cdee98363191d31b6a1cdc766926f8d120364b React Native version: N/A OS: Ubuntu 20.04.5 LTS (Linux 5.4.0-144-generic x86_64) Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64): x86_64
Steps To Reproduce
Build steps
Test case
testcase
```javascript let r = [ ] ; for ( let t = 0 ; t * 10 < 2500 ; ++ t ) { t += t * 10 ; print ( " 0 one - two - three - four - a " + " a " ) ; r. push ( 1 << t + " a " + ( " " + t ) ) ; r. pop ( ) ; r. push ( " " + t ) ; } r. some ( ( { [ t ] : t }, e ) => { r. splice ( ) ; r [ r. length - 1 ] = { [ e ] : t % 128 } ; r [ r. length ] ++ ; return e < t | t - e == 1 << e ; } ) ; ```
Execution steps & Output
Backtrace
when executed in release mode
Output
The Expected Behavior
This code should not crash. Other JS engines (such as V8, JSC, etc.) identify a ReferenceError.
Credits: @Ye0nny, @EJueon