You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running address sanitization tests on our code base with Hermes and I'm encountering a consistent stack-use-after-scope errors with ES6 classes. I've narrowed down the issue to the code here:
One of the calling functions makeHermesES6InternalCall calls toNodeList which returned an ESTree::NodeList that was allocated on the stack. Changing the code such that the ESTree::NodeList is created on the stack of makeHermesES6InternalCall instead fixes the ASAN error. I'm not 100% sure why this is happening and it may be due to some compiler specific optimizations.
It creates a little bit a repetitiveness but removing the toNodeList function (and replacing the calling sites with the appropriate fix) resolved the issue entirely for me.
Let me know what you think.
I have run gradle clean and confirmed this bug does not occur with JSC
The issue is reproducible with the latest version of React Native.
Hermes git revision (if applicable):
React Native version:
OS:
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64):
Steps To Reproduce
code example:
The Expected Behavior
The text was updated successfully, but these errors were encountered:
Bug Description
I'm running address sanitization tests on our code base with Hermes and I'm encountering a consistent stack-use-after-scope errors with ES6 classes. I've narrowed down the issue to the code here:
hermes/lib/AST/ES6Class.cpp
Lines 58 to 65 in 7991309
One of the calling functions
makeHermesES6InternalCall
callstoNodeList
which returned anESTree::NodeList
that was allocated on the stack. Changing the code such that theESTree::NodeList
is created on the stack ofmakeHermesES6InternalCall
instead fixes the ASAN error. I'm not 100% sure why this is happening and it may be due to some compiler specific optimizations.hermes/lib/AST/ES6Class.cpp
Lines 400 to 412 in 7991309
It creates a little bit a repetitiveness but removing the
toNodeList
function (and replacing the calling sites with the appropriate fix) resolved the issue entirely for me.Let me know what you think.
gradle clean
and confirmed this bug does not occur with JSCHermes git revision (if applicable):
React Native version:
OS:
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64):
Steps To Reproduce
code example:
The Expected Behavior
The text was updated successfully, but these errors were encountered: