Re: Tuple sort is broken. It crashes on simple test.
Peter Geoghegan <pg@heroku.com>
From: Peter Geoghegan <pg@heroku.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Mithun Cy <mithun.cy@enterprisedb.com>, pgsql-hackers <pgsql-hackers@postgresql.org>,
Robert Haas <robertmhaas@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>
Date: 2017-01-16T18:24:20Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-NULL-pointer-dereference-in-tuplesort.c.patch (text/x-patch) patch 0001
- (unnamed) (text/plain)
On Mon, Jan 16, 2017 at 3:48 AM, Michael Paquier <michael.paquier@gmail.com> wrote: > Indeed. It crashes for me immediately by adding an ORDER BY: > select count(distinct t) from seq_tab order by 1; The problem was that one particular call to the macro RELEASE_SLAB_SLOT() happened to lack a test-for-NULL-argument needed by pass-by-value datum cases. The other two RELEASE_SLAB_SLOT() calls already have such a check. Attached patch fixes the bug. -- Peter Geoghegan
Commits
-
Fix NULL pointer dereference in tuplesort.c.
- 4e46c97fde42 10.0 landed
-
Change the way pre-reading in external sort's merge phase works.
- e94568ecc10f 10.0 cited