Avoid use of uninitialized variable (src/pl/plperl/plperl.c)
Hi.
In (src/pl/plperl/plperl.c) if *PERL_SYS_INIT3* is defined and
*MYMALLOC* is not, is possible use of variable
*perl_sys_init_done* uninitialized.
To fix, explicitly initialize the variable.
In pass change type to bool, what was the initial intention.
trivial patch attached.
best regards,
Ranier Vilela
Attachments:
v1-001-avoid-use-uninitialized-variable-plperl.patchapplication/octet-stream; name=v1-001-avoid-use-uninitialized-variable-plperl.patchDownload+2-2
Hi,
On 2025-09-02 14:39:44 -0300, Ranier Vilela wrote:
In (src/pl/plperl/plperl.c) if *PERL_SYS_INIT3* is defined and
*MYMALLOC* is not, is possible use of variable
*perl_sys_init_done* uninitialized.
Static variables are zero initialized by definition, no?
Greetings,
Andres Freund
Em ter., 2 de set. de 2025 às 14:42, Andres Freund <andres@anarazel.de>
escreveu:
Hi,
On 2025-09-02 14:39:44 -0300, Ranier Vilela wrote:
In (src/pl/plperl/plperl.c) if *PERL_SYS_INIT3* is defined and
*MYMALLOC* is not, is possible use of variable
*perl_sys_init_done* uninitialized.Static variables are zero initialized by definition, no?
Yeah. My bad, sorry for the noise.
best regards,
Ranier Vilela