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

Thomas Stüfe thomas.stuefe at gmail.com
Wed Mar 6 11:27:06 UTC 2019


Okay next try:

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

Fixed problems:

- On AIX, we can read from the zero page. So, test has to use another
address. Briefly considered reserving and protecting a page, but this is
actually simpler.

- On Windows 32bit, we cannot call any VM functions from gtest which
require signal handling to work (e.g. anything relying on SafeFetch) since
that depends on SEH handler to be set up correctly somewhere above the
caller frame. This is done for all "normal" entry points into the VM, e.g.
CreateJavaVM or thread start functions. However, if one just calls directly
into the VM, we do not have signal handling in place. Or, more
specifically, we have the SEH handler of the gtest framework, which assumes
the test segfaulted.
I am actually confused why this works on 64bit windows. One possibility
would be that someone uses VectoredException handling, which is a handling
mechanism similar to Unix. I see it switched on for AOT - maybe that is the
reason it "accidentally" works.
Not sure, and actually not eager to solve this now, so I openend a new
issue: https://bugs.openjdk.java.net/browse/JDK-8220220. Note the pretty
bug id.

So, for this patch, I just excluded the part of the test reading unreadable
memory from Windows.

Cheers, Thomas







On Fri, Mar 1, 2019 at 10:18 AM Langer, Christoph <christoph.langer at sap.com>
wrote:

> Hi Thomas,
>
> > > Unless it really irks you, lets keep it that way. We all spent way too
> much
> > time on this thing, and
> > > while it is a really fascinating topic... :)
> >
> > Yeah, no reason to sink more time into it. Let's move on!
>
> It's not done yet ��
>
> Looking at our nightly results where we test the patch in 11u context, we
> can see that the crash on Solaris is gone but the test error in Win32 is
> not fixed yet and on AIX the test fails now. All the platforms we love most
> ��
>
> Best regards
> Christoph
>
>


More information about the hotspot-dev mailing list