public inbox for [email protected]
help / color / mirror / Atom feedFrom: Jacob Champion <[email protected]>
To: Andreas Karlsson <[email protected]>
Cc: Галкин Сергей <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: DEREF_AFTER_NULL: src/common/jsonapi.c:2529
Date: Mon, 6 Apr 2026 10:57:22 -0700
Message-ID: <CAOYmi+muy=Wtk0dv6J5HmcFTMvrPMe2MGN2X+hjZL7DKSUEXLQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
On Mon, Apr 6, 2026 at 4:59 AM Andreas Karlsson <[email protected]> wrote:
> The code is correct but a bit confusing.
Yeah, it's not great. The need for this (security-critical!) code to
wrangle three separate allocation conventions is error-prone, to say
the least.
> If someone has a patch improving readability
Suggestions?
> adding this noop NULL check to silence a false positive from a
> static analyzer does not seem like an improvement.
We do occasionally merge code to silence false positives, and we could
maybe do something with pg_assume() here, but I agree that it'd be
better to refactor it so that it's obviously correct.
--Jacob
view thread (10+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: DEREF_AFTER_NULL: src/common/jsonapi.c:2529
In-Reply-To: <CAOYmi+muy=Wtk0dv6J5HmcFTMvrPMe2MGN2X+hjZL7DKSUEXLQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox