Symptom: make check is failed on i586 machine (x86_64 - OK). make: *** [Makefile:1995: check] Error 1
make: *** [Makefile:1995: check] Error 1
From testdir/gssproxy.log
==9591== Memcheck, a memory error detector ==9591== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==9591== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==9591== Command: ./gssproxy -i -s /usr/src/RPM/BUILD/gssproxy-0.8.0/testdir/gssproxy/gp.sock -c /usr/src/RPM/BUILD/gssproxy-0.8.0/testdir/gssproxy/gp.conf ==9591== [2018/03/19 07:35:51]: Debug Enabled (level: 3) ==9591== ==9591== Process terminating with default action of signal 11 (SIGSEGV) ==9591== General Protection Fault ==9591== at 0x805910B: gp_strerror (gp_util.c:100) ==9591== by 0x804E071: write_pid (gp_init.c:197) ==9591== by 0x804BE04: main (gssproxy.c:238) ==9591== ==9591== HEAP SUMMARY: ==9591== in use at exit: 3,948 bytes in 120 blocks ==9591== total heap usage: 1,156 allocs, 1,036 frees, 108,201 bytes allocated ==9591== ==9591== LEAK SUMMARY: ==9591== definitely lost: 0 bytes in 0 blocks ==9591== indirectly lost: 0 bytes in 0 blocks ==9591== possibly lost: 0 bytes in 0 blocks ==9591== still reachable: 3,948 bytes in 120 blocks ==9591== suppressed: 0 bytes in 0 blocks ==9591== Rerun with --leak-check=full to see details of leaked memory ==9591== ==9591== For counts of detected and suppressed errors, rerun with: -v ==9591== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
(gdb) bt #0 gp_strerror (errnum=<optimized out>) at src/gp_util.c:100 #1 0x0804e072 in write_pid () at src/gp_init.c:197 #2 0x0804be05 in main (argc=<optimized out>, argv=<optimized out>) at src/gssproxy.c:238 │97 } else if (ret != buf) { │ │98 memset(buf, 0, MAX_GP_STRERROR); │ │99 strncpy(buf, ret, MAX_GP_STRERROR); │ >│100 buf[MAX_GP_STRERROR -1] = '\0'; (gdb) disassemble Dump of assembler code for function gp_strerror: 0x08059090 <+0>: push %ebp 0x08059091 <+1>: push %edi 0x08059092 <+2>: push %esi 0x08059093 <+3>: push %ebx 0x08059094 <+4>: mov %gs:0x0,%ebp 0x0805909b <+11>: sub $0x1c,%esp 0x0805909e <+14>: call 0x804ac70 <__errno_location@plt> 0x080590a3 <+19>: mov %eax,%esi 0x080590a5 <+21>: mov (%eax),%eax 0x080590a7 <+23>: lea -0x400(%ebp),%ebx 0x080590ad <+29>: sub $0x4,%esp 0x080590b0 <+32>: mov %eax,0x10(%esp) 0x080590b4 <+36>: push $0x400 0x080590b9 <+41>: push %ebx 0x080590ba <+42>: pushl 0x3c(%esp) 0x080590be <+46>: call 0x804b0c0 <strerror_r@plt> 0x080590c3 <+51>: add $0x10,%esp 0x080590c6 <+54>: test %eax,%eax 0x080590c8 <+56>: mov %eax,%edx 0x080590ca <+58>: je 0x8059130 <gp_strerror+160> 0x080590cc <+60>: cmp %ebx,%eax 0x080590ce <+62>: je 0x8059116 <gp_strerror+134> 0x080590d0 <+64>: lea 0x4(%ebx),%edi 0x080590d3 <+67>: mov %ebx,%ecx 0x080590d5 <+69>: xor %eax,%eax 0x080590d7 <+71>: movl $0x0,%gs:0xfffffc00 0x080590e2 <+82>: movl $0x0,0x3fc(%ebx) 0x080590ec <+92>: sub $0x4,%esp 0x080590ef <+95>: and $0xfffffffc,%edi 0x080590f2 <+98>: sub %edi,%ecx 0x080590f4 <+100>: add $0x400,%ecx 0x080590fa <+106>: shr $0x2,%ecx 0x080590fd <+109>: rep stos %eax,%es:(%edi) 0x080590ff <+111>: push $0x400 0x08059104 <+116>: push %edx 0x08059105 <+117>: push %ebx 0x08059106 <+118>: call 0x804aee0 <strncpy@plt> 0x0805910b <+123>: movb $0x0,%gs:0xffffffff 0x08059113 <+131>: add $0x10,%esp 0x08059116 <+134>: mov 0xc(%esp),%eax 0x0805911a <+138>: mov %eax,(%esi) 0x0805911c <+140>: add $0x1c,%esp 0x0805911f <+143>: lea -0x400(%ebp),%eax 0x08059125 <+149>: pop %ebx 0x08059126 <+150>: pop %esi 0x08059127 <+151>: pop %edi 0x08059128 <+152>: pop %ebp 0x08059129 <+153>: ret 0x0805912a <+154>: lea 0x0(%esi),%esi 0x08059130 <+160>: lea 0x4(%ebx),%edi 0x08059133 <+163>: mov %ebx,%ecx 0x08059135 <+165>: movl $0x0,%gs:0xfffffc00 0x08059140 <+176>: movl $0x0,0x3fc(%ebx) 0x0805914a <+186>: sub $0x4,%esp 0x0805914d <+189>: and $0xfffffffc,%edi 0x08059150 <+192>: sub %edi,%ecx 0x08059152 <+194>: add $0x400,%ecx 0x08059158 <+200>: shr $0x2,%ecx 0x0805915b <+203>: rep stos %eax,%es:(%edi) 0x08059140 <+176>: movl $0x0,0x3fc(%ebx) 0x0805914a <+186>: sub $0x4,%esp 0x0805914d <+189>: and $0xfffffffc,%edi 0x08059150 <+192>: sub %edi,%ecx 0x08059152 <+194>: add $0x400,%ecx 0x08059158 <+200>: shr $0x2,%ecx 0x0805915b <+203>: rep stos %eax,%es:(%edi) 0x0805915d <+205>: push $0x400 0x08059162 <+210>: push $0x805d790 0x08059167 <+215>: push %ebx 0x08059168 <+216>: call 0x804aee0 <strncpy@plt> 0x0805916d <+221>: movb $0x0,%gs:0xffffffff 0x08059175 <+229>: add $0x10,%esp 0x08059178 <+232>: jmp 0x8059116 <gp_strerror+134> End of assembler dump. [builder@localhost .in]$ gcc --version i586-alt-linux-gcc (GCC) 7.3.1 20180130 (ALT 7.3.1-alt3)
I'm packing gssproxy at ALTLinux and planning to enable tests during RPM build time. I skipped i586 tests for now.
Reproduces on Fedora. Filed glibc bug: https://bugzilla.redhat.com/show_bug.cgi?id=1558111
Project has moved please reopen here if still an issue: https://github.com/gssapi/gssproxy/issues
Metadata Update from @simo: - Issue close_status updated to: Deferred - Issue status updated to: Closed (was: Open)