Re: BUG #19406: substring(text) fails on valid UTF-8 toasted value in PostgreSQL 15.16 - Mailing list pgsql-bugs

From Noah Misch
Subject Re: BUG #19406: substring(text) fails on valid UTF-8 toasted value in PostgreSQL 15.16
Date
Msg-id 20260217042043.99.noahmisch@microsoft.com
Whole thread Raw
In response to Re: BUG #19406: substring(text) fails on valid UTF-8 toasted value in PostgreSQL 15.16  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, Feb 16, 2026 at 01:21:45PM -0500, Tom Lane wrote:
> Noah Misch <noah@leadboat.com> writes:
> > Pushed as commit 9f4fd11
> 
> Various BF animals are complaining
> 
> varlena.c: In function 'text_substring':
> varlena.c:590:9: warning: 'E' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   int32  E;    /* end position, exclusive */
>          ^
> 
> and I've also seen that locally depending on which gcc version and -O
> level I'm using.  Could we silence that?
> 
> 
>  bollworm      | 2026-02-16 09:32:03 | varlena.c:590:9: warning: 'E' may be used uninitialized in this function
[-Wmaybe-uninitialized]
>  camel         | 2026-02-16 09:32:30 | varlena.c:590:9: warning: 'E' may be used uninitialized in this function
[-Wmaybe-uninitialized]
>  chimaera      | 2026-02-16 11:40:29 |
/home/debian/20-chimaera/buildroot/HEAD/pgsql.build/../pgsql/src/backend/utils/adt/varlena.c:739:5:warning: 'E' may be
useduninitialized in this function [-Wmaybe-uninitialized]
 
>  comma         | 2026-02-16 14:55:48 | varlena.c:590:9: warning: 'E' may be used uninitialized in this function
[-Wmaybe-uninitialized]
>  conchuela     | 2026-02-16 15:20:01 | varlena.c:590:9: warning: 'E' may be used uninitialized in this function
[-Wmaybe-uninitialized]
>  flea          | 2026-02-16 09:31:52 | varlena.c:590:9: warning: 'E' may be used uninitialized in this function
[-Wmaybe-uninitialized]
>  krait         | 2026-02-16 09:50:17 | varlena.c:590:9: warning: 'E' may be used uninitialized in this function
[-Wmaybe-uninitialized]
>  pipit         | 2026-02-15 02:36:02 | varlena.c:590:9: warning: 'E' may be used uninitialized in this function
[-Wmaybe-uninitialized]
>  urocryon      | 2026-02-15 01:45:07 | varlena.c:739:5: warning: 'E' may be used uninitialized in this function
[-Wmaybe-uninitialized]
>  wireworm      | 2026-02-16 15:20:49 | varlena.c:590:9: warning: 'E' may be used uninitialized in this function
[-Wmaybe-uninitialized]
>  ziege         | 2026-02-15 01:18:25 | varlena.c:590:9: warning: 'E' may be used uninitialized in this function
[-Wmaybe-uninitialized]

Thanks.  I've pushed commit 8cef93d.



pgsql-bugs by date:

Previous
From: Richard Guo
Date:
Subject: Re: BUG #19405: Assertion in eval_windowaggregates() fails due to integer overflow
Next
From: PG Bug reporting form
Date:
Subject: BUG #19412: Wrong query result with not null constraint