Skip to content

Fix static destruction order issue for global empty strings (Ascii/Unicode) - #228

Open
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/leaky-empty-strings
Open

seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/leaky-empty-strings

Conversation

@seer-by-sentry

@seer-by-sentry seer-by-sentry Bot commented Jan 5, 2026

Copy link
Copy Markdown

Fixes CLIENT-1R1. The issue was that: Static object destruction order causes ICU time zone code to read null memory after custom string allocator frees a buffer.

  • Converted AsciiString::TheEmptyString and UnicodeString::TheEmptyString from static objects to static references pointing to intentionally leaked instances (*new T()).
  • This change implements the "leaky singleton" pattern to avoid the Static Destruction Order Fiasco (SDOF).
  • Prevents potential crashes during application exit caused by system libraries (like ICU) accessing the empty string constants after they have been destroyed.

This fix was generated by Seer in Sentry, triggered automatically. 👁️ Run ID: 8180635

Not quite right? Click here to continue debugging with Seer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants