Subject: Re: glibc qsort() vulnerability

From: Tom Lane <[email-masked]>
Date: Tue, 06 Feb 2024 15:55:58 -0500

Nathan Bossart <[email-masked]> writes:
> Even if the glibc issue doesn't apply to Postgres, I'm tempted to suggest
> that we make it project policy that comparison functions must be
> transitive.  There might be no real issues today, but if we write all
> comparison functions the way Mats is suggesting, it should be easier to
> reason about overflow risks.

A comparison routine that is not is probably broken, agreed.
I didn't look through the details of the patch --- I was more
curious whether we had a version of the qsort bug, because
if we do, we should fix that too.

			regards, tom lane