Re: Don't pass NULL pointer to strcmp().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Xing Guo <higuoxing(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Junwang Zhao <zhjwpku(at)gmail(dot)com>
Subject: Re: Don't pass NULL pointer to strcmp().
Date: 2023-11-02 15:59:35
Message-ID: 3123130.1698940775@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Looking closer, I realized that my proposed change in RestoreGUCState
is unnecessary, because guc_free() is already permissive about being
passed a NULL. That leaves us with one live bug in
get_explain_guc_options, two probably-unreachable hazards in
check_GUC_init and write_one_nondefault_variable, and two API changes
in GetConfigOption and GetConfigOptionResetString. I'm dubious that
back-patching the API changes would be a good idea, so I applied
that to HEAD only. The rest I backpatched as far as relevant.

Thanks for the report!

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2023-11-02 16:07:19 Re: Three commit tips
Previous Message Tomas Vondra 2023-11-02 15:30:10 Re: logical decoding and replication of sequences, take 2