Re: pgsql: Fix double-release of spinlock - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Fix double-release of spinlock
Date
Msg-id 2803949.1722271519@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Fix double-release of spinlock  (Andres Freund <andres@anarazel.de>)
Responses Re: pgsql: Fix double-release of spinlock
List pgsql-committers
Andres Freund <andres@anarazel.de> writes:
> On 2024-07-29 12:33:13 -0400, Tom Lane wrote:
>> I dunno, is that the only extra check that the --disable-spinlocks
>> implementation is providing?

> I think it also provides the (valuable!) check that spinlocks were actually
> initialized. But that again seems like something we'd be better off adding
> more general infrastructure for - nobody runs --disable-spinlocks locally, we
> shouldn't need to run this on the buildfarm to find problems like this.

Hmm, but how?  One of the things we gave up by nuking HPPA support
was that that platform's representation of an initialized, free
spinlock was not all-zeroes, so that it'd catch this type of problem.
I think all the remaining platforms do use zeroes, so it's hard to
see how anything short of valgrind would be likely to catch it.

            regards, tom lane



pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: Fix double-release of spinlock
Next
From: Robert Haas
Date:
Subject: Re: pgsql: Fix double-release of spinlock