pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: exclusion@gmail.com
Subject: BUG #19780: gtsvector_picksplit() reads uninitialized data when called with three entries
Date: Wed, 21 Oct 2026 18:00:01 +0000
Message-ID: <19780-93fb5c0e4ec2af18@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      19780
Logged by:          Alexander Lakhin
Email address:      exclusion@gmail.com
PostgreSQL version: 19rc1
Operating system:   Ubuntu 24.04
Description:        

The following script:
CREATE TABLE t (i tsvector, j tsvector);
CREATE INDEX t_idx ON t USING gist (i tsvector_ops (siglen = '1800'), j
tsvector_ops);
INSERT INTO t SELECT (SELECT string_agg(g::text, ' ')::tsvector FROM
generate_series(1, 200) g), 'x'::tsvector FROM generate_series(1, 4);

INSERT INTO t SELECT (SELECT string_agg(g::text, ' ')::tsvector FROM
generate_series(1, 200) g) || 'a', 'x'::tsvector;

being executed under Valgrind, triggers:
==00:00:00:57.066 1678143== Conditional jump or move depends on
uninitialised value(s)
==00:00:00:57.066 1678143==    at 0x48CBC35: gtsvector_picksplit
(tsgistidx.c:685)
==00:00:00:57.066 1678143==    by 0x493208E: FunctionCall2Coll (fmgr.c:1163)
==00:00:00:57.066 1678143==    by 0x41409A3: gistUserPicksplit
(gistsplit.c:433)
==00:00:00:57.066 1678143==    by 0x414127B: gistSplitByKey
(gistsplit.c:697)
==00:00:00:57.066 1678143==    by 0x4141504: gistSplitByKey
(gistsplit.c:747)
==00:00:00:57.066 1678143==    by 0x4134199: gistSplit (gist.c:1483)
==00:00:00:57.066 1678143==    by 0x4131D58: gistplacetopage (gist.c:316)
==00:00:00:57.066 1678143==    by 0x4133D6D: gistinserttuples (gist.c:1310)
==00:00:00:57.066 1678143==    by 0x4133CC7: gistinserttuple (gist.c:1263)
==00:00:00:57.066 1678143==    by 0x413310D: gistdoinsert (gist.c:892)
==00:00:00:57.067 1678143==    by 0x41319E7: gistinsert (gist.c:191)
==00:00:00:57.067 1678143==    by 0x4184D62: index_insert (indexam.c:231)
==00:00:00:57.067 1678143==

Reproduced on REL_14_STABLE .. master.








view thread (8+ messages)  latest in thread

Message-ID: <19780-93fb5c0e4ec2af18@postgresql.org>
Permalink:  ../19780-93fb5c0e4ec2af18@postgresql.org/
Also on:    postgresql.org/message-id/19780-93fb5c0e4ec2af18@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, exclusion@gmail.com
  Subject: Re: BUG #19780: gtsvector_picksplit() reads uninitialized data when called with three entries
  In-Reply-To: <19780-93fb5c0e4ec2af18@postgresql.org>
  References: <19780-93fb5c0e4ec2af18@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox