[crac] RFR: Fixing crash on restore when user name is not set

Roman Marchenko rmarchenko at openjdk.org
Wed Oct 18 07:29:37 UTC 2023


On Tue, 17 Oct 2023 11:51:08 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

>> This change fixes a crash occuring during restore in a container when user name is not set.
>
> src/hotspot/os/posix/perfMemory_posix.cpp line 1405:
> 
>> 1403:   char* user_name = get_user_name(geteuid());
>> 1404:   if (!user_name) {
>> 1405:     return false;
> 
> Could we accompany this with an error message?

I'm not sure about an error message as it doesn't fail restore procedure. 
The same scenario from [here ](https://github.com/openjdk/crac/blob/crac/src/hotspot/os/posix/perfMemory_posix.cpp#L1032) doesn't show any message also.

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

PR Review Comment: https://git.openjdk.org/crac/pull/129#discussion_r1363376921


More information about the crac-dev mailing list