RFR: 8282306: os::is_first_C_frame(frame*) crashes on invalid link access [v2]
David Holmes
dholmes at openjdk.java.net
Wed Feb 23 20:36:58 UTC 2022
On Wed, 23 Feb 2022 16:10:25 GMT, Johannes Bechberger <duke at openjdk.java.net> wrote:
>> This PR introduces a new method `can_access_link` into the frame class to check the accessibility of the link information. It furthermore adds a new `os::is_first_C_frame(frame*, Thread*)` that uses the `can_access_link` method
>> and the passed thread object to check the validity of frame pointer, stack pointer, sender frame pointer and sender stack pointer. This should reduce the possibilities for crashes.
>
> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
>
> Improve use of C macros
I'm struggling to understand the motivation for this change and what problem is being solved.
Do all these extra checks need to be done in product bits or would debug-only work? What kind of errors are we trying to guard against by doing this?
Thanks,
David
src/hotspot/share/utilities/vmError.cpp line 338:
> 336: // is_first_C_frame() does only simple checks for frame pointer,
> 337: // it will pass if java compiled code has a pointer in EBP.
> 338: if (os::is_first_C_frame(&fr, t)) return invalid;
Is the comment still accurate?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7591
More information about the hotspot-dev
mailing list