[13] RFR (S): 8218874: C2: Unsafe to access PhaseIdealLoop outside of constructors
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Tue Feb 12 23:15:27 UTC 2019
http://cr.openjdk.java.net/~vlivanov/8218874/webrev.00/
https://bugs.openjdk.java.net/browse/JDK-8218874
It's unsafe to access PhaseIdealLoop outside of its constructors: its
internal data structures may be corrupted because
PhaseIdealLoop::build_and_optimize() allocates some of them under local
ResourceMark.
Proposed fix is:
* use caller scope for memory allocation (as other Phases do);
* to simplify PhaseIdealLoop usage, introduce static method
optimize() and allocate PhaseIdealLoop there prepended by ResourceMark;
Testing: hs-precheckin-comp, tier1-5
Best regards,
Vladimir Ivanov
More information about the hotspot-compiler-dev
mailing list