pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Mats Kindahl <mats@timescale.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: glibc qsort() vulnerability
Date: Thu, 08 Feb 2024 15:39:29 -0500
Message-ID: <1242426.1707424769@sss.pgh.pa.us> (raw)
In-Reply-To: <20240208200737.GA504276@nathanxps13>
References: <20240208004207.aoyrtv577nmhrivy@awork3.anarazel.de>
	<20240208015211.GA445153@nathanxps13>
	<20240208020637.3irwi5vph4fbxw2f@awork3.anarazel.de>
	<CA+hUKGLbC4O56rtFM69Tx6StT3PcVio9K2GisjZp=z6O20Q3sw@mail.gmail.com>
	<CA+hUKGJaOM5ULeXboxV+fGkU-pYHotL5A10hYxdu8_kwRcVEgQ@mail.gmail.com>
	<20240208025620.GC445153@nathanxps13>
	<CA+14424k0MbdkJuSSLrr1==PYK+oL5Gtq7siTsMgCs+KcCrEvA@mail.gmail.com>
	<20240208183835.GA503311@nathanxps13>
	<1074897.1707417842@sss.pgh.pa.us>
	<20240208195954.vlpoii4ftoow2of4@awork3.anarazel.de>
	<20240208200737.GA504276@nathanxps13>

Nathan Bossart <nathandbossart@gmail.com> writes:
> On Thu, Feb 08, 2024 at 11:59:54AM -0800, Andres Freund wrote:
>> I'd put these static inlines into common/int.h. I don't think this is common
>> enough to warrant being in c.h. Probably also doesn't hurt to have a not quite
>> as generic name as INT_CMP, I'd not be too surprised if that's defined in some
>> library.
>> 
>> I think it's worth following int.h's pattern of including [s]igned/[u]nsigned
>> in the name, an efficient implementation for signed might not be the same as
>> for unsigned. And if we use static inlines, we need to do so for correct
>> semantics anyway.

> Seems reasonable to me.

+1 here also.

			regards, tom lane





view thread (64+ messages)  latest in thread

Message-ID: <1242426.1707424769@sss.pgh.pa.us>
Permalink:  ../1242426.1707424769@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1242426.1707424769@sss.pgh.pa.us

 · 

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: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com, andres@anarazel.de, mats@timescale.com, thomas.munro@gmail.com, hlinnaka@iki.fi, pgsql-hackers@lists.postgresql.org
  Subject: Re: glibc qsort() vulnerability
  In-Reply-To: <1242426.1707424769@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox