summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/tsquery_gist.c
diff options
context:
space:
mode:
authorTom Lane2018-01-03 02:23:02 +0000
committerTom Lane2018-01-03 02:23:06 +0000
commit5dc692f78d3bee1e86d095a9e8d9242b44f78b01 (patch)
tree76ba4d6b57529e606988d9939851ea97793757c4 /src/backend/utils/adt/tsquery_gist.c
parent54eff5311d7c8e3d309774713b91e78067d2ad42 (diff)
Ensure proper alignment of tuples in HashMemoryChunkData buffers.
The previous coding relied (without any documentation) on the data[] member of HashMemoryChunkData being at a MAXALIGN'ed offset. If it was not, the tuples would not be maxaligned either, leading to failures on alignment-picky machines. While there seems to be no live bug on any platform we support, this is clearly pretty fragile: any addition to or rearrangement of the fields in HashMemoryChunkData could break it. Let's remove the hazard by getting rid of the data[] member and instead using pointer arithmetic with an explicitly maxalign'ed offset. Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/utils/adt/tsquery_gist.c')
0 files changed, 0 insertions, 0 deletions