Skip to content

There is no nullptr check after call to erts_prtsd_get in erts_dist_command #9413

Closed
@pinskia

Description

This comes via https://gcc.gnu.org/PR118821 .

Since erts_prtsd_get can return a nullptr (0), GCC will isolate the null ptr access path and that can cause extra warnings to show up. In the case of the reported issue is extra warning with respect of an atomic store that might be storing to a null ptr offset.

It is better if add an assert or some other thing of protection here to make sure erts_prtsd_get does not get a nullptr.

https://github.com/erlang/otp/blob/29138f5dd1618d197ff382e7748756bd904678f7/erts/emulator/beam/dist.c#L3874C16-L3874C20 is the location I am talking about.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions