pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Alexander Lakhin <exclusion@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
To: Andreas Karlsson <andreas@proxel.se>
To: zengman <zengman@halodbtech.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Speed up ICU case conversion by using ucasemap_utf8To*()
Date: Thu, 12 Mar 2026 06:00:00 +0200
Message-ID: <96d80a47-f17f-42fa-82b1-2908efbd6541@gmail.com> (raw )
In-Reply-To: <cca5b4a19d68e4488ffab1f41b222a7b4c60468f.camel@j-davis.com >
References: <167986ff-afcf-4542-94c6-61ee8474e138@proxel.se >
<72c7c2b5848da44caddfe0f20f6c7ebc7c0c6e60.camel@j-davis.com >
<c380cf11-dd23-4a75-af3e-3da8ec88bf6c@proxel.se >
<tencent_32015AAF279D4D696813121C@qq.com >
<4cfde442-25dd-495f-8d76-a23502ce17b8@proxel.se >
<744b9998-4463-4be5-b60e-a960eeb43202@proxel.se >
<tencent_3C4ABC775EDA640F219A5E69@qq.com >
<5a010b27-8ed9-4739-86fe-1562b07ba564@proxel.se >
<cca5b4a19d68e4488ffab1f41b222a7b4c60468f.camel@j-davis.com >
Hello Jeff,
07.01.2026 00:10, Jeff Davis wrote:
> Committed, thank you!
I've discovered that starting from c4ff35f10, the following query:
CREATE COLLATION c (provider = icu, locale = 'icu_something');
makes asan detect (maybe dubious, but still..) stack-buffer-overflow:
==21963==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd386d4e63 at pc 0x650cd7972a76 bp 0x7ffd386d4e00
sp 0x7ffd386d45a8
...
Address 0x7ffd386d4e63 is located in stack of thread T0 at offset 67 in frame
#0 0x650cd86962ef in foldcase_options (.../usr/local/pgsql/bin/postgres+0x12322ef) (BuildId:
e441a9634858193e7358e5901e7948606ff5b1b1)
This frame has 2 object(s):
[48, 52) 'status' (line 993)
[64, 67) 'lang' (line 992) <== Memory access at offset 67 overflows this variable
I use a build made with:
CC=gcc-13 CPPFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address -static-libasan" ./configure --with-icu ...
Could you please have a look?
Best regards,
Alexander
view thread (19+ messages) latest in thread
Message-ID: <96d80a47-f17f-42fa-82b1-2908efbd6541@gmail.com>
Permalink: ../96d80a47-f17f-42fa-82b1-2908efbd6541@gmail.com/
Also on: postgresql.org/message-id/96d80a47-f17f-42fa-82b1-2908efbd6541@gmail.com
copy link · copy postgr.es
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: exclusion@gmail.com, pgsql@j-davis.com, andreas@proxel.se, zengman@halodbtech.com
Subject: Re: Speed up ICU case conversion by using ucasemap_utf8To*()
In-Reply-To: <96d80a47-f17f-42fa-82b1-2908efbd6541@gmail.com>
* 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