[QUOTE=JinxterX;402782]The normal wcslen function in glibc worked fine up until 2.15, the problem now is the automatic SSE2 optimisation of wcslen kicks in if those features are detected on the CPU. Due to the nature of the routine (written in assembler) and the size of the registers to be loaded, if a string is misaligned (i.e. at a odd memory address) then the incorrect length is returned, however, the routine is functioning 100% correctly, the fault lies with the original binary. Pretty sure there’s compiler flags to ensure alignment in C++ based programs (which ETQW is).
Take a look at wcslen-sse2.S in the glibc sources if you want, as this is the routine at the heart of the matter and it was added by a libc devs in 2.15, it’s nothing to do with Archlinux. Short of bypassing this routine altogether (by disabling multi-arch entirely or introducing a patch) you have to fix any alignment stuff at source, which I assume is what the Sublime Text people did and then recompiled.
The Linux version of ETQW however cannot be recompiled as development stopped a long time ago, therefore we have to work around the problem.[/QUOTE]
I disagree. Optimizations of this nature should only be enabled if 1) the hardware supports the features used and 2) the input data is valid for the optimization.
If only #2 were not true - life for cross platform devs would be just that bit easier
Also - compilers cannot ensure alignment of dynamic data.