Re: Odd 9.4, 9.3 buildfarm failure on s390x
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Mark Wong <mark@2ndQuadrant.com>,
Andrew Gierth <andrew@tao11.riddles.org.uk>,
Andrew Dunstan <andrew.dunstan@2ndQuadrant.com>,
pgsql-hackers@postgresql.org
Date: 2018-10-05T15:12:55Z
Lists: pgsql-hackers
Attachments
- allow-INT_MIN-as-comparison-result-2.patch (text/x-diff) patch
- memcmp-hack.patch (text/x-diff) patch
I wrote: > Here's a draft patch against HEAD for this. > I looked for problem spots by (a) testing with the STRESS_SORT_INT_MIN > option I added in nbtcompare.c, (b) grepping for "x = -x" type code, > and (c) grepping for "return -x" type code. (b) and (c) found several > places that (a) didn't, which does not give me a warm feeling about > whether I have found quite everything. I thought of another, uglier way to stress things: make wrappers around memcmp, strcmp, and strncmp to force those to return INT_MIN/0/INT_MAX, thereby modeling what we see is happening on Mark's machine. This successfully exposed the bug I'd already found by grepping in pg_rewind/filemap.c, as well as some astonishingly unportable code in contrib/ltree. The attached update incorporates Thomas' suggestion for the macro name, as well as the ltree fix. For completeness, I also show the very quick-hacky way I changed memcmp et al, but I don't propose committing that. I'm inclined to just go ahead and apply/backpatch this. It's certainly possible that more bugs remain to be found, but I have no good ideas about how to search for them, and in any case that wouldn't invalidate the patch as it stands. regards, tom lane
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow btree comparison functions to return INT_MIN.
- 6e63e0697516 9.3.25 landed
- 60cc2414beac 9.6.11 landed
- 26cc27541d92 9.4.20 landed
- 0dc6bf633a28 9.5.15 landed
- c87cb5f7a679 12.0 landed
- 67e7d4da72dc 11.0 landed
- 142cfd3cd82e 10.6 landed