Re: Re: [COMMITTERS] pgsql: Modify the isolation tester so that multiple sessions can wait. - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Re: [COMMITTERS] pgsql: Modify the isolation tester so that multiple sessions can wait.
Date
Msg-id CAEepm=3hXcJNiPB3h8j0eezn9XV5yQH6Q3d6TTCr4eK36VAQhA@mail.gmail.com
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Modify the isolation tester so that multiple sessions can wait.  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Re: [COMMITTERS] pgsql: Modify the isolation tester so that multiple sessions can wait.
List pgsql-hackers
On Thu, Apr 28, 2016 at 7:02 AM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Robert Haas wrote:
>
>> That looks like malloc() returned NULL.  I noticed when writing that
>> patch that isolationtester has never had any checks for malloc
>> returning NULL, which is bad, and probably worth fixing, but I didn't
>> choose to stop and fix it at that time.
>
> I didn't actually check closely but I wondered whether the pointer
> arithmetic is actually correct.  Note that the memcpy length is zero.
> I doubt malloc returning null is the problem; how could it happen
> exactly at the same spot every time the suite has run?
>
>> I don't know off-hand why you see that problem starting at this commit
>> and not before, or why it doesn't show up on other machines.
>
> Perhaps it's only a problem for OpenBSD's libc and not for glibc which
> is the most common.  The only other openbsd machine in buildfarm doesn't
> run the isolation tests.

Also happens on OpenBSD 5.8.  Isn't this a classic case where memmove
is called for?  Replacing the memcpy at line 617 with memmove makes
the tests run successfully, but at first glance the other two
instances of memcpy in run_permutation should also be changed to
memmove, no?

-- 
Thomas Munro
http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: pg_dump dump catalog ACLs
Next
From: Bruce Momjian
Date:
Subject: Re: pgindent