RFR: JDK-8282405: Make thread resource areas signal safe [v5]
David Holmes
david.holmes at oracle.com
Fri Mar 11 06:25:21 UTC 2022
Hi Thomas,
On 9/03/2022 7:15 pm, Thomas Stuefe wrote:
> I put this back into draft for further refinement.
>
> @kimbarrett , @dholmes-ora :
>
> Atm I tend toward a solution as laid out in my comment https://github.com/openjdk/jdk/pull/7624#issuecomment-1059713107.
>
> Condensed:
>
> The secondary "safe" ResourceArea would be one that has a single chunk and cannot grow more chunks. That chunk would be either (a) allocated with raw ::malloc(), on demand only on first RA use, or (b) just use an array placed on the stack in the frame that entered ACGT.
Sorry but how can you constrain the new RA to only a single chunk? What
if it needs to grow? IIUC we don't know exactly what RA allocation may
be attempted in the signal context via AGCT or other code.
And apologies but I'm about to disappear for a week on vacation.
Cheers,
David
-----
> If I go with (b), that solution may be restricted to AGCT only since with signal handling, we cannot be sure how much stack we have left.
>
> If that sounds okay to you both, I go with this. I only want to spend time on this if we agree on the general direction.
>
> ..Thomas
>
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/7624
More information about the hotspot-runtime-dev
mailing list