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


Reply via email to