Bug 401719

Summary: strerror_r on i686 causes a GPF
Product: [Developer tools] valgrind Reporter: Robbie Harwood <rharwood>
Component: memcheckAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal CC: mark, pjfloyd
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://bugzilla.redhat.com/show_bug.cgi?id=1558107
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: reproducer

Description Robbie Harwood 2018-12-03 20:58:36 UTC
Created attachment 116661 [details]
reproducer

With the attached code, we observe the following:

[root@rawhide32 tmp]# gcc -O0 -ggdb -std=c99 test.c -o test
[root@rawhide32 tmp]# valgrind ./test
==16919== Memcheck, a memory error detector
==16919== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==16919== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==16919== Command: ./test
==16919== 
==16919== 
==16919== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==16919==  General Protection Fault
==16919==    at 0x80485B4: main (test.c:23)
==16919== 
==16919== HEAP SUMMARY:
==16919==     in use at exit: 0 bytes in 0 blocks
==16919==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==16919== 
==16919== All heap blocks were freed -- no leaks are possible
==16919== 
==16919== For counts of detected and suppressed errors, rerun with: -v
==16919== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Violación de segmento
[root@rawhide32 tmp]# rpm -qv glibc gcc
glibc-2.27.9000-10.fc29.i686
gcc-8.0.1-0.18.fc29.i686
[root@rawhide32 tmp]#

This bug was initially reported downstream to Fedora at https://bugzilla.redhat.com/show_bug.cgi?id=1558107