Skip to content

perl_clone() does not properly initialize internal_random_state #23024

Open
@demerphq

Description

@demerphq

Description
perl_clone() in sv.c should initialize all members of the proto_perl() before use. It seems that from the first day we added internal_random_state() we have not been initializing it properly in sv.c

I have a patch, but I wanted to create an issue first.

Steps to Reproduce
N/A

Expected behavior
We should either be treating it the same as random_state or we should initialize it in some well defined way. We should not be using undefined bytes in the structure.

Perl configuration
This is true as of 5.41.9

Metadata

Metadata

Assignees

Labels

internals issuesome kind of internals issue that is not necessarily user visible

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions