]> granicus.if.org Git - postgresql/commit
Fix possible "invalid memory alloc request size" failure in nodeHash.c.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 4 Oct 2015 18:16:59 +0000 (14:16 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 4 Oct 2015 18:17:14 +0000 (14:17 -0400)
commit45dd7cdbabae665e4a37750da97ee296c2f76d32
tree8dd9d14e38c454c5b7a179bebec45d6e8d884413
parent0f6a046b6736c1fc5af5cea36561312e33effef9
Fix possible "invalid memory alloc request size" failure in nodeHash.c.

Limit the size of the hashtable pointer array to not more than
MaxAllocSize.  We've seen reports of failures due to this in HEAD/9.5,
and it seems possible in older branches as well.  The change in
NTUP_PER_BUCKET in 9.5 may have made the problem more likely, but
surely it didn't introduce it.

Tomas Vondra, slightly modified by me
src/backend/executor/nodeHash.c