Re: BUG #16329: Valgrind detects an invalid read when building a gist index with buffering
Alexander Law <exclusion@gmail.com>
From: Alexander Lakhin <exclusion@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Date: 2020-05-02T04:45:00Z
Lists: pgsql-bugs
06.04.2020 09:00, Alexander Lakhin wrote: > 30.03.2020 00:00, PG Bug reporting form wrote: >>> Running the following query under valgrind: >>> create table gist_point_tbl(id int4, p point); >>> insert into gist_point_tbl (id, p) >>> select g, point(g*10+1, g*10+1) from generate_series(1, 30000) g; >>> create index gist_pointidx2 on gist_point_tbl using gist(p) with (buffering >>> = on, fillfactor=50); >>> >>> leads to a memory access error: >>> ==00:00:00:08.755 18585== Invalid read of size 2 >>> ==00:00:00:08.756 18585== at 0x1F94CA: gistBuildCallback >>> (gistbuild.c:495) > Please look at the patch that modifies the gist regression test to make > the issue visible and fixes it by avoiding access to the memory context > that can be reset in gistProcessEmptyingQueue(). Could you please let me know if the fix is incorrect (or not elaborated enough to be included in the upcoming releases) or this issue is false positive? Best regards, Alexander
Commits
-
Fix dereference of dangling pointer in GiST index buffering build.
- d2a1d4b190ec 12.15 landed
- b5c6776c1127 11.20 landed
- a1904c9ce56a 14.8 landed
- 8e5eef50c5b4 16.0 landed
- 2dc77adc768e 15.3 landed
- 2adb6adad5f8 13.11 landed
-
Fix GiST buffering build to work when there are included columns.
- 962ab473ec3d 13.1 landed
- 371668a8389d 14.0 landed
- 12945874ebd6 12.5 landed
-
Re-allow testing of GiST buffered builds.
- 78c0b6ed273a 14.0 landed
-
Add support for building GiST index by sorting.
- 16fa9b2b30a3 14.0 cited