simdutf8 icon indicating copy to clipboard operation
simdutf8 copied to clipboard

Mislink on Windows with lld and thinlto

Open djkoloski opened this issue 4 years ago • 2 comments

It appears that validate_utf8_basic and similar functions trigger a mislink on Windows with lld and thinlto. This is not a terribly uncommon combination, so it may be worth exploring alternatives that do not cause this mislink.

This is an issue @Kixiron ran into while using bytecheck, which uses simdutf8 for fast string validation. The issue was traced back to simdutf8 using a release build with debug symbols and WinDbg, then the memory backing the AtomicPtr was rewound to the beginning of the application and verified to be invalid. This indicates that the function pointer placed in it was not relocated to the correct address.

djkoloski avatar Jul 17 '21 01:07 djkoloski

@djkoloski Thanks for the heads-up! Seems like a bug in LLD, let's hope we can get it fixed soon.

hkratz avatar Jul 20 '21 06:07 hkratz

That is unfortunately still an issue with LLD from LLVM 13.

hkratz avatar Aug 22 '21 18:08 hkratz

This has been fixed.

hkratz avatar Jan 08 '23 06:01 hkratz