Avoid use of uninitialized variable (src/pl/plperl/plperl.c)

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Avoid use of uninitialized variable (src/pl/plperl/plperl.c)
Date: 2025-09-02 17:39:44
Message-ID: CAEudQArdmr+XMC1uSO36zMiKKrNkm0Vj4=tt2DN7TO5VrPNvwA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v1-001-avoid-use-uninitialized-variable-plperl.patch application/octet-stream 704 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-09-02 17:42:17 Re: Avoid use of uninitialized variable (src/pl/plperl/plperl.c)
Previous Message David Geier 2025-09-02 17:06:10 Disabling memory overcommit deemed dangerous