[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#887169: libc6: recent upgrade to 2.26-3 broke Steam games (Civ5)



Hello,

The GLIBC_TUNABLES solution indeed works. Thanks for the quick response!

Best,
James

On 2018-01-14 03:22 PM, Aurelien Jarno wrote:
> clone 887169 -1
> reassign -1 gcc-7
> retitle -1 gcc-7: missed optimization of glibc strspn SSE 4.2 variant
> forwarded -1 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81481
> block 887169 by -1
> thanks
> 
> On 2018-01-14 10:35, James Lu wrote:
>> Package: libc6
>> Version: 2.26-3
>> Severity: normal
>>
>> Dear maintainers,
>>
>> On a recent glibc upgrade on buster/sid (first to 2.26-2 and then
>> 2.26-3), one Steam game (Civilization V) consistently segfaults on startup.
>>
>> Similar issues have been reported in Arch Linux[1], Fedora[2], and
>> OpenSUSE[3], where the consensus was that building glibc with
> 
> From what I get about the above reported issues, this bug is caused by:
> - the Steam games not following the Linux/x86 ABI wrt stack alignement
> - the SSE4.2 version of the strspn function needing to push an SSE
>   register to the stack when build with GCC 7, due to a missed
>   optimization.
> 
>> -mstackrealign fixed the issue. (I haven't been able to get such a local
>> build working though)
> 
> I don't think it is actually the consensus, only Arch Linux has chosen
> this solution, and building the whole glibc with this option will have
> an impact of the performances for all binaries, not only the broken
> Steam ones. I therefore don't think it's the right way to fix the bug.
> 
> Instead it looks like fixing PR81481 [1] on the GCC 7 side, and then
> rebuilding glibc is the way to go. I am therefore cloning this bug to
> gcc-7 so that it can happens.
> 
> In the meantime I guess you can run the Steam games by disabling SSE4.2
> optimized function using the glibc tunables. Run the game with the
> GLIBC_TUNABLES environment variable defined as follow:
> 
>   GLIBC_TUNABLES=glibc.tune.hwcaps=-SSE4_2
> 
> Aurelien
> 
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81481
> 


Reply to: