Avoid use of uninitialized variable (src/pl/plperl/plperl.c)
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
Re: Avoid use of uninitialized variable (src/pl/plperl/plperl.c)
От:
Andres Freund <andres@anarazel.de>
Дата:
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
Re: Avoid use of uninitialized variable (src/pl/plperl/plperl.c)
От:
Ranier Vilela <ranier.vf@gmail.com>
Дата:
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