RFR: 8313796: AsyncGetCallTrace crash on unreadable interpreter method pointer [v4]
Thomas Stuefe
stuefe at openjdk.org
Tue Aug 8 06:27:53 UTC 2023
On Mon, 7 Aug 2023 21:26:00 GMT, Richard Startin <duke at openjdk.org> wrote:
>> @tstuefe implemented explicitly for being signal safe.
>
> OK let's go with your suggestion, thanks for explaining. I'm actually skeptical this can actually be a non-null bad pointer, as we've only seen this crash happen once, and the pointer was null in that instance. But this solution looks robust, so thanks for suggesting it.
@richardstartin About async-safety: all supported (jit) architectures use static assembly as @theRealAph pointed out, these should be signal safe. The code snippet you found is only used by zero. You are probably not concerned with zero. And even there, yes, we longjmp out of signal handling, since there is no other way to implement SafeFetch in zero. That is technically async-sig-unsafe, but in practice it works and is tested for use in signal handlers.
About safety, @fisk is right in that this is still not completely safe since Method (and any of the objects chained to it that AGCT implicitly relies on being there, e.g. ConstMethod) can get out of scope while AGCT uses them.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15178#discussion_r1286645990
More information about the hotspot-dev
mailing list