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

Thomas Stüfe thomas.stuefe at gmail.com
Thu Feb 28 15:21:02 UTC 2019


Took this over from Christoph since he is busy with other stuff.

http://cr.openjdk.java.net/~stuefe/webrevs/8219650-shade-print-hex/webrev.00/webrev/

New webrev.

I changed:

- Fixed alignment issue in os::print_hex_dump
- the test now explicitly tests bad alignment

Note that the reason is_readable_pointer() did not catch the SIGBUS was
that is_readable_pointer() does a SafeFetch32 on the address; so, it just
requires 32bit alignment. In the crash case, we had 32bit aligned pointer
and tried to load a 64bit valute (unitsize=8).


..Thomas




On Mon, Feb 25, 2019 at 3:44 PM Aleksey Shipilev <shade at redhat.com> wrote:

> On 2/25/19 3:26 PM, Langer, Christoph wrote:
> > please review the following small test fix.
> >
> > 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.
>
> -Aleksey
>
>


More information about the hotspot-dev mailing list