RFR: 8348562: ZGC: segmentation fault due to missing node type check in barrier elision analysis
Richard Reingruber
rrich at openjdk.org
Mon Jan 27 07:01:46 UTC 2025
On Fri, 24 Jan 2025 10:38:29 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
> Adding the missing node type check as described in the JBS issue. `oopptr` can be null in which case the current implementation crashes. This was only reported for JFR tests on PPC64 so far. If the expected graph pattern is not found, we bail out and skip the optimization.
>
> `make run-test TEST="jdk/jfr" JTREG="VM_OPTIONS=-XX:+UseZGC"` has passed on linux PPC64le.
> ```
> V [libjvm.so+0xa1a3f0] TypePtr::offset() const+0x14 (type.hpp:994)
> V [libjvm.so+0x1d35288] get_base_and_offset(MachNode const*, long&)+0xb0 (zBarrierSetC2.cpp:557)
> V [libjvm.so+0x1d35818] is_allocation(Node const*)+0x108 (zBarrierSetC2.cpp:629)
> ```
`is_allocation` is looking for a memory reference where `base` is `Op_ThreadLocal`. @TheRealMDoerr would you mind reproducing the crash with a little bit of tracing that dumps `base` just before the crash? S.th. like `base->dump(3) ; base->dump(-3);` I guess it is pretty unlikely but I'd like to make sure that we don't miss an actual allocation because the pattern is a little bit different on ppc.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23295#issuecomment-2614975747
More information about the hotspot-compiler-dev
mailing list