RFR: 8325095: C2: bailout message broken: ResourceArea allocated string used after free
David Holmes
dholmes at openjdk.org
Fri Feb 16 07:02:54 UTC 2024
On Fri, 16 Feb 2024 06:43:39 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/utilities/cHeapStringHolder.cpp line 36:
>>
>>> 34: _string[len] = 0; // terminating null
>>> 35: // Make sure it is written before the pointer is used again
>>> 36: OrderAccess::storestore();
>>
>> Is this internal string being exposed to other threads ??? That seems dangerous in general given this is a stackobj.
>
> @dholmes-ora I don't think it is exposed to other threads. It only goes as far up as CompileTask, so I think it always stays in the compile thread. I saw `OrderAccess::storestore()` in the `stringStream` code. But maybe I don't need it here?
`OrderAccess` is only needed for exchanging data across threads.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17710#discussion_r1492031296
More information about the hotspot-dev
mailing list