Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gecko] Avoid incorrect compiler optimisation. JB#49864
When building using gcc 8.3 and -O3, the null check on IsInsideNursery() from js/public/HeapAPI.h gets dropped when used inside the ProxyObject::New() method from js/src/vm/ProxyObject.cpp, called from "priv.toGCThing()->isTenured()" on line 50 of the same file. Since it's possible for the cell pointer to be null, the over-optimisation can cause SIGSERV crashes. SeaMonkey bug 1584533i details the same issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1584533 The fix adds the appropriate check back in directly to the ProxyObject::New() code, which then doesn't get optimised out.
- Loading branch information