zmodem wrote: A few notes from looking today.
Reduced main a bit further: ``` int main(int argc, const char** argv) { volatile auto p = &FilteredBreakIteratorBuilder::createEmptyInstance; icu::UnicodeString* St = new icu::UnicodeString("abacabadabacab", 15); delete St; printf("OKAY\n"); return 0; } ``` That is, we don't need to run any code from filteredbrk.cpp, just reference it. Since the code won't be run, we can strip as much of it as possible. (Attaching what I got so far: [filteredbrk.cpp.txt](https://github.com/user-attachments/files/19488511/filteredbrk.cpp.txt)) These pieces of code are needed to keep reproducing: ``` SimpleFilteredBreakIteratorBuilder::SimpleFilteredBreakIteratorBuilder(const Locale &fromLocale, UErrorCode &status) : fSet(status) { UnicodeString s; } static inline UnicodeString* newUnicodeStringArray(size_t count) { return new UnicodeString[count ? count : 1]; } BreakIterator * SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UErrorCode& status) { int32_t subCount = fSet.size(); UnicodeString *ustrs_ptr = newUnicodeStringArray(subCount); } ``` So we've got both scalar new and regular construction there. What's *really* interesting is that if I manually inline `newUnicodeStringArray` into `build` like this: ``` BreakIterator * SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UErrorCode& status) { int32_t subCount = fSet.size(); UnicodeString *ustrs_ptr = new UnicodeString[subCount ? subCount : 1]; } ``` the crash goes away. That seems like a major hint. What's different in the object file before/after that manual inlining, and how might that affect linking? https://github.com/llvm/llvm-project/pull/126240 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits