[crac] RFR: 8350845: [CRaC] Support C/R engines in form of a library [v2]

Radim Vansa rvansa at openjdk.org
Wed Mar 5 08:55:09 UTC 2025


On Tue, 4 Mar 2025 13:53:00 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:

>> src/hotspot/share/runtime/crac.cpp line 310:
>> 
>>> 308:   const char *description = engine.description();
>>> 309:   if (description == nullptr) {
>>> 310:     log_error(crac)("CRaC engine failed to provide its textual description");
>> 
>> API says that returning `nullptr` is a valid behaviour - shouldn't log error (maybe just print some placeholder text). The same below.
>
> What I meant is: the API doc says "Returns ... null on error" => if `description == nullptr` then there has been an error in the engine (e.g. it decided to malloc the string and failed) => log the error and exit.

OK, it can easily return `""` when it wants to stay enigmatic.

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

PR Review Comment: https://git.openjdk.org/crac/pull/207#discussion_r1980958885


More information about the crac-dev mailing list