Re: Speed up ICU case conversion by using ucasemap_utf8To*()
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Andreas Karlsson <andreas@proxel.se>, Alexander Lakhin
<exclusion@gmail.com>, zengman <zengman@halodbtech.com>, pgsql-hackers
<pgsql-hackers@postgresql.org>
Date: 2026-04-13T18:40:03Z
Lists: pgsql-hackers
On Wed, 2026-04-01 at 02:46 +0200, Andreas Karlsson wrote: > On 3/12/26 5:00 AM, Alexander Lakhin wrote: > > 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 > > My proposed fix is that we allocate a ULOC_LANG_CAPACITY buffer for > the > language like we do in fix_icu_locale_str() instead of trying to be > clever. Thank you both! Committed with minor revisions: * also check the status code, just to be sure * backport to 18 where the original code was introduced Regards, Jeff Davis
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Check for unterminated strings when calling uloc_getLanguage().
- dacd8fa6f259 19 (unreleased) landed
- ca938ec213d9 18.4 landed
- a756067a0e3b 17.10 landed
- 8167371704bd 16.14 landed
-
Fix overrun when comparing with unterminated ICU language string.
- 6393259bd49d 18.4 landed
- 06ce97b9994e 19 (unreleased) landed
-
ICU: use UTF8-optimized case conversion API
- c4ff35f10441 19 (unreleased) landed