Re: BUG #17847: Unaligned memory access in ltree_gist
Alexander Korotkov <aekorotkov@gmail.com>
From: Alexander Korotkov <aekorotkov@gmail.com>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-bugs@lists.postgresql.org
Date: 2023-03-19T17:09:27Z
Lists: pgsql-bugs
On Sat, Mar 18, 2023 at 10:00 AM Alexander Lakhin <exclusion@gmail.com> wrote: > 16.03.2023 22:35, Tom Lane wrote: > > I wonder which other opclasses besides ltree have the same issue. > > > I found no other similar places: siglen is also accepted by opclasses > gist__intbig_ops, gist_hstore_ops, gist_trgm_ops, tsvector_ops, > which implementations use functions > _intbig_alloc, ghstore_alloc, gtrgm_alloc, gtsvector_alloc, > and none of them adds siglen to a pointer. > Quick testing confirms that. > > (gist__ltree_ops uses ltree_gist_alloc(), but the problematic branch > "if (left) ..." not reached for gist__ltree_ops) Yep, ltree seems the only place storing aligned value *after* signature. Thank you for validating this. ------ Regards, Alexander Korotkov
Commits
-
Validate ltree siglen GiST option to be int-aligned
- f4a4a18ecbdb 14.8 landed
- 214495dc5b71 15.3 landed
- 8bbd0cce92be 16.0 landed
- 48c6825d0ec8 13.11 landed
-
Fix custom validators call in build_local_reloptions()
- 02191136cb25 13.11 landed
- 9ef5a3583784 14.8 landed
- 6e7361c85e95 15.3 landed
- cd115c3530bd 16.0 landed