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

Martin Doerr mdoerr at openjdk.org
Wed Oct 5 10:27:19 UTC 2022


On Tue, 27 Sep 2022 12:39:27 GMT, Johannes Bechberger <duke at openjdk.org> wrote:

> Hardening os::is_first_C_frame(frame*) against accesses on invalid links.
> 
> Applies relatively clean (only a comment changed which hindered it from applying directly).
> 
> Tested via nightly SAP builds and on my own linux machine.

Your version removes

-  // stack grows downwards; if old_fp is below current fp or if the stack
-  // frame is too large, either the stack is corrupted or fp is not saved
-  // on stack (i.e. on x86, ebp may be used as general register). The stack
-  // is not walkable beyond current frame.
-  if (old_fp < ufp) return true;
-  if (old_fp - ufp > 64 * K) return true;

which is not done by the original change. Is that by mistake? Otherwise, please explain.

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

PR: https://git.openjdk.org/jdk11u-dev/pull/1373


More information about the jdk-updates-dev mailing list