Re: ubsan fails on 32bit builds

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>, pgsql-hackers@postgresql.org, Fujii Masao <masao.fujii@oss.nttdata.com>, torikoshia <torikoshia@oss.nttdata.com>
Date: 2022-11-17T20:15:04Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2022-11-17 14:20:47 -0500, Robert Haas wrote:
>> Not that I object to a targeted fix

> Should we backpatch this fix? Likely this doesn't cause active breakage
> outside of 32bit builds under ubsan, but that's not an unreasonable thing to
> want to do in the backbranches.

+1 for backpatching what you showed.

>> but it's been 10 years since
>> slist and dlist were committed, and we really ought to eliminate
>> SHM_QUEUE entirely in favor of using those.

> Agreed. I had started on a set of patches for some of the SHM_QUEUE uses, but
> somehow we ended up a bit stuck on the naming of dlist_delete variant that
> afterwards zeroes next/prev so we can replace SHMQueueIsDetached() uses.

Also +1, but of course for HEAD only.

			regards, tom lane



Commits

  1. Fix mislabeling of PROC_QUEUE->links as PGPROC, fixing UBSan on 32bit