RFR: 8325095: C2: bailout message broken: ResourceArea allocated string used after free [v2]

Emanuel Peter epeter at openjdk.org
Tue Mar 5 06:37:59 UTC 2024


On Fri, 23 Feb 2024 18:31:44 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> @vnkozlov @tstuefe thanks for the comments and suggestions!
>> 
>> What I did:
>> - Moved `utilities/cHeapStringHolder.hpp/cpp` -> `compiler/cHeapStringHolder.hpp/cpp`.
>> - Directly use `mtCompiler` for it, rather than constructor argument with `MEMFLAGS`.
>> - Fixed 2 issues (bugs and code style)
>> 
>> What I did not yet do:
>> Any changes to logging. I think we want to do that in a separate RFE anyway, and not backport it together with this bugfix.
>> Is there anything that you still need me to change for this bugfix here?
>> 
>> About Logging, in a future RFE:
>> @vnkozlov suggested to always UL failures immediately. The question is where I should do that. At `ciEnv::record_method_not_compilable` only? Or also in `Compile::record_method_not_compilable`?
>> And @vnkozlov also suggested only to report one (a single) failure reason at the very end, presumably at the `CompileTask` level. Does that mean you would still overwrite the less important failures with more important ones in `ciEnv`, like we do currently?
>
>>About Logging, in a future RFE:
> @vnkozlov suggested to always UL failures immediately. The question is where I should do that. At ciEnv::record_method_not_compilable only? Or also in Compile::record_method_not_compilable?
> 
> `Compile::record_method_not_compilable()` calls `ciEnv::record_method_not_compilable()` so you need only add it to ciEnv.
> 
>>And @vnkozlov also suggested only to report one (a single) failure reason at the very end, presumably at the CompileTask level. Does that mean you would still overwrite the less important failures with more important ones in ciEnv, like we do currently?
> 
> I suggest to leave the normal report code as it is now (one failure). And if we need additional information we will use UL when we implement it.
> 
> Most ciEnv failures are recorded (`record_failure`) during publishing compiled code in `ciEnv::register_method()` after compilation is done and it did not have failures.

Thanks @vnkozlov @dlunde @tstuefe @dholmes-ora for reviewing / your suggestions!
Thanks @jdksjolen for all the memory allocation conversations!

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

PR Comment: https://git.openjdk.org/jdk/pull/17710#issuecomment-1978056891


More information about the hotspot-dev mailing list