Re: Don't pass NULL pointer to strcmp().
От
Nathan Bossart
Тема
Re: Don't pass NULL pointer to strcmp().
Дата
Msg-id
20231102023255.GB82553@nathanxps13
Ответ на
Re: Don't pass NULL pointer to strcmp(). (Tom Lane)
Список
Дерево обсуждения
Don't pass NULL pointer to strcmp(). Xing Guo <higuoxing@gmail.com>
Re: Don't pass NULL pointer to strcmp(). Junwang Zhao <zhjwpku@gmail.com>
Re: Don't pass NULL pointer to strcmp(). Aleksander Alekseev <aleksander@timescale.com>
Re: Don't pass NULL pointer to strcmp(). Xing Guo <higuoxing@gmail.com>
Re: Don't pass NULL pointer to strcmp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Don't pass NULL pointer to strcmp(). Xing Guo <higuoxing@gmail.com>
Re: Don't pass NULL pointer to strcmp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Don't pass NULL pointer to strcmp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Don't pass NULL pointer to strcmp(). Nathan Bossart <nathandbossart@gmail.com>
Re: Don't pass NULL pointer to strcmp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Don't pass NULL pointer to strcmp(). Nathan Bossart <nathandbossart@gmail.com>
Re: Don't pass NULL pointer to strcmp(). Xing Guo <higuoxing@gmail.com>
Re: Don't pass NULL pointer to strcmp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Don't pass NULL pointer to strcmp(). Xing Guo <higuoxing@gmail.com>
On Wed, Nov 01, 2023 at 09:57:18PM -0400, Tom Lane wrote: > I wrote: >> Hmm ... if we're doing it ourselves, I suppose we've got to consider >> it supported :-(. But I'm still wondering how many seldom-used >> code paths didn't get the message. An example here is that this >> could lead to GetConfigOptionResetString returning NULL, which >> I think is outside its admittedly-vague API spec. > > After digging around for a bit, I think part of the problem is a lack > of a clearly defined spec for what should happen with NULL string GUCs. > In the attached v3, I attempted to remedy that by adding a comment in > guc_tables.h (which is maybe not the best place but I didn't see a > better one). That led me to a couple more changes beyond what you had. What if we disallowed NULL string GUCs in v17? That'd simplify the spec and future-proof against similar bugs, but it might also break a fair number of extensions. If there aren't any other reasons to continue supporting it, maybe it's the right long-term approach, though. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления