[13] RFR (S): 8218874: C2: Unsafe to access PhaseIdealLoop outside of constructors
Vladimir Kozlov
vladimir.kozlov at oracle.com
Wed Feb 13 18:04:33 UTC 2019
There was problem with RM when run with -XX:+VerifyLoopOptimizations.
Please, check that. Otherwise it looks good.
Thanks,
Vladimir K
On 2/12/19 3:15 PM, Vladimir Ivanov wrote:
> 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