RFR(S): 8219650: [Testbug] Fix potential crashes in new test hotspot gtest "test_print_hex_dump"

Langer, Christoph christoph.langer at sap.com
Mon Feb 25 15:23:47 UTC 2019


> >>> Bug: https://bugs.openjdk.java.net/browse/JDK-8219650
> >>> Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8219650.0/
> >>
> >> Looks good to me.
> >>
> >> If you will, I'd prefer to allocate char* to guarantee the size of array.
> >
> > I wonder, separately, if print_hex_dump should be resilient against
> unaligned addresses too, e.g.
> > aligning the start by machine word width? It could be called from VM code
> with whatever start/end, I
> > think.

I discussed that with Thomas. Maybe we should align the start address down to unitsize in os::print_hex_dump, instead of asserting.

> ...and print_hex_dump is supposed to be resilient, because I'd expect
> SafeFetch to handle SIGBUS
> from unaligned accesses too. I see the signal handler for linux_x86 and
> solaris_x86 handle all
> signals, not only SEGVs. So, why did the test SIGBUS'ed? What a rabbit hole.

Good point, will see if we can figure out more. Interestingly, the test crashes on one Solaris machine (that tests jdk11u here), but not on another (where jdk/jdk is tested).


More information about the hotspot-dev mailing list