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

Johannes Bechberger duke at openjdk.java.net
Wed Feb 23 15:07:05 UTC 2022


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.

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

Commit messages:
 - Improve os::is_first_C_frame(...)
 - Add frame::can_access_link(Thread *t) and use it

Changes: https://git.openjdk.java.net/jdk/pull/7591/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7591&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8282306
  Stats: 35 lines in 10 files changed: 32 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7591.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7591/head:pull/7591

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


More information about the hotspot-dev mailing list