RFR: 8282306: os::is_first_C_frame(frame*) crashes on invalid link access [v9]

Thomas Stuefe stuefe at openjdk.java.net
Sat Feb 26 08:23:54 UTC 2022


On Sat, 26 Feb 2022 07:55:07 GMT, Johannes Bechberger <duke at openjdk.java.net> wrote:

>> test/hotspot/gtest/runtime/test_os.cpp line 874:
>> 
>>> 872:   frame invalid_frame;
>>> 873:   EXPECT_TRUE(os::is_first_C_frame(&invalid_frame)); // the frame has zeroes for all values
>>> 874: 
>> 
>> Please add a test with valid looking but garbage pointers, to test that your safefetch really works. We usually do this by reserving + protecting a stripe of memory and using that one as guaranteed faulting pointer.
>
> I thought about, but was unsure how to it properly.

No problem, it's probably enough in its current form.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7591


More information about the hotspot-dev mailing list