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
{{ message }}
Repository navigation
WithRuntimeDecorator createArrayBuffer bypasses its runtime guard #58776
WithRuntimeDecorator::createArrayBuffer delegates to the wrapped runtime without constructing Around around{with_}. Adjacent methods construct that guard before delegation.
This bypasses the supplied guard's before/after policy during allocation and exception unwinding. Inspected in React Native 0.86.3, 0.87.1 and main 3818b20eed.
Reproduction
A wrapped allocator records the guard depth while creating an ArrayBuffer. Stock code sees depth 0 and invokes neither callback. With the RAII scope, allocation runs at depth 1 and callbacks balance on both return and throw.
Two focused native GTests fail on stock sources and pass with the scope added. They also check supplied buffer size/data. This demonstrates the guard omission; it does not attribute other Hermes crashes to it.
Activity