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

Bug#948396: New glibc broke existing app due to historic stack alignment



Package: libc6-i386
Version: 2.29-8

Since updating my system today our build system binaries started crashing.

Upon further investigation problem is that __mktime_internal code in
libc6-i386 now started using 'movaps' instruction without aligning stack
on 16 byte boundary.

As far as I can tell, while x86-64 ABI requires stack to be aligned on
entry to the functions, x86 ABI does not have any such requirement, and
so glibc should align stack itself if it wants to use XMM instructions that
require aligned values.

It seems that libc6:i386 is compiled correctly, so I worked around by installing
that instead of libc6-i386:amd64.


[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/build/toolchain/lin32/p7zip-9.20/bin/7za x -y -tzip /bhavesh/home/petr/drboss/'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xf7dbe0e2 in __mktime_internal (tp=0xffb60f8c, convert=0xf7dbd990 <__GI___gmtime_r>, offset=0xf7ee6350 <gmtime_offset>) at mktime.c:387
387     mktime.c: No such file or directory.
(gdb) bt
#0  0xf7dbe0e2 in __mktime_internal (tp=0xffb60f8c, convert=0xf7dbd990 <__GI___gmtime_r>, offset=0xf7ee6350 <gmtime_offset>) at mktime.c:387
#1  0xf7dc114d in timegm (tmp=0xffb60f8c) at timegm.c:33
#2  0x0804aa2b in ?? ()
#3  0x080704fc in ?? ()
#4  0x080f6859 in ?? ()
#5  0x0807fdf8 in ?? ()
#6  0x080804de in ?? ()
#7  0x080fa53a in ?? ()
#8  0x0808d0f9 in ?? ()
#9  0x0808f118 in ?? ()
#10 0x08054101 in ?? ()
#11 0x08057edf in ?? ()
#12 0xf7d2b811 in __libc_start_main (main=0x8057eb0, argc=6, argv=0xffb61be4, init=0x804a190, fini=0x8141ab0, rtld_fini=0xf7f41300 <_dl_fini>, stack_end=0xffb61bdc) at ../csu/libc-start.c:308
#13 0x0804a871 in ?? ()
(gdb) x /10i $eip-19
   0xf7dbe0cf <__mktime_internal+591>:  psubq  %xmm1,%xmm0
   0xf7dbe0d3 <__mktime_internal+595>:  movd   %xmm0,0x78(%esp)
   0xf7dbe0d9 <__mktime_internal+601>:  movq   %xmm0,0x90(%esp)
=> 0xf7dbe0e2 <__mktime_internal+610>:  movaps %xmm0,(%esp)
   0xf7dbe0e6 <__mktime_internal+614>:  movaps %xmm0,0x10(%esp)
   0xf7dbe0eb <__mktime_internal+619>:  mov    0x40(%esp),%eax
   0xf7dbe0ef <__mktime_internal+623>:  mov    %edi,%ecx
   0xf7dbe0f1 <__mktime_internal+625>:  mov    %esi,%edx
   0xf7dbe0f3 <__mktime_internal+627>:  call   0xf7dbdc10 <ranged_convert>
   0xf7dbe0f8 <__mktime_internal+632>:  test   %eax,%eax
(gdb) print /x $esp
$1 = 0xffb60e24


Reply to: