[libav-bugs] [Bug 1119] New: misaligned stack on i386-netbsd

bugzilla at libav.org bugzilla at libav.org
Tue Mar 13 21:24:55 CET 2018


            Bug ID: 1119
           Summary: misaligned stack on i386-netbsd
           Product: Libav
           Version: git HEAD
          Hardware: Other
                OS: BSD
            Status: NEW
          Severity: minor
          Priority: ---
         Component: general
          Assignee: bugzilla at libav.org
          Reporter: michael.kostylev at gmail.com

Created attachment 710
  --> https://bugzilla.libav.org/attachment.cgi?id=710&action=edit
proposed patch

Something similar to 847190ebd99ffd57dc89bd568a33bf2d5c424129
could be done for NetBSD too, but even the gcc builds suffer from misaligned
stack there. A dump from 2016-10:

% gdb --args /home/mik/src/fate/32/tests/checkasm/checkasm
Program received signal SIGSEGV, Segmentation fault.
ff_h264_idct8_add_10_sse2 () at
546     IDCT8_ADD
(gdb) bt
#0  ff_h264_idct8_add_10_sse2 () at
#1  0x00000008 in ?? ()
#2  0xfbd16040 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) disas $pc-32,$pc+32
Dump of assembler code from 0x818e56a to 0x818e5aa:
   0x0818e56a <ff_h264_idct8_add_10_sse2+346>:  punpckhdq %xmm7,%xmm1
   0x0818e56e <ff_h264_idct8_add_10_sse2+350>:  movdqa %xmm0,%xmm7
   0x0818e572 <ff_h264_idct8_add_10_sse2+354>:  punpcklqdq %xmm3,%xmm0
   0x0818e576 <ff_h264_idct8_add_10_sse2+358>:  punpckhqdq %xmm3,%xmm7
   0x0818e57a <ff_h264_idct8_add_10_sse2+362>:  movdqa %xmm5,%xmm3
   0x0818e57e <ff_h264_idct8_add_10_sse2+366>:  punpcklqdq %xmm1,%xmm5
   0x0818e582 <ff_h264_idct8_add_10_sse2+370>:  punpckhqdq %xmm1,%xmm3
   0x0818e586 <ff_h264_idct8_add_10_sse2+374>:  movdqa (%ecx),%xmm1
=> 0x0818e58a <ff_h264_idct8_add_10_sse2+378>:  movdqa %xmm0,(%esp)
   0x0818e58f <ff_h264_idct8_add_10_sse2+383>:  movdqa %xmm7,0x20(%esp)
   0x0818e595 <ff_h264_idct8_add_10_sse2+389>:  movdqa %xmm5,0x40(%esp)
   0x0818e59b <ff_h264_idct8_add_10_sse2+395>:  movdqa %xmm3,0x60(%esp)
   0x0818e5a1 <ff_h264_idct8_add_10_sse2+401>:  movdqa %xmm6,%xmm3
   0x0818e5a5 <ff_h264_idct8_add_10_sse2+405>:  punpckldq %xmm2,%xmm6
   0x0818e5a9 <ff_h264_idct8_add_10_sse2+409>:  punpckhdq %xmm2,%xmm3
End of assembler dump.
(gdb) info registers
eax            0xffffd700       -10496
ecx            0xffffd9a0       -9824
edx            0x10     16
ebx            0x6549315c       1699295580
esp            0xffffd2ec       0xffffd2ec
ebp            0x33627ba7       0x33627ba7
esi            0xe02f3e23       -533774813
edi            0xb78d0d1d       -1215492835
eip            0x818e58a        0x818e58a <ff_h264_idct8_add_10_sse2+378>
eflags         0x10286  [ PF SF IF RF ]
cs             0x37     55
ss             0x4f     79
ds             0x4f     79
es             0x4f     79
fs             0x4f     79
gs             0x8b     139

The attached patch, for example, makes the x86_32-netbsd-gcc config
green and drastically reduces error count in x86_32-netbsd-clang:

gmake: *** [fate-filter-drawbox] Error 1
gmake: *** [fate-lavr-mix-q15-7-1] Error 1
gmake: *** [fate-lavr-resample-s32p-2626-8000] Error 1
gmake: *** [fate-lavr-resample-s32p-2626-44100] Error 1
gmake: *** [fate-lavr-resample-s32p-2626-48000] Error 1
gmake: *** [fate-lavr-resample-s32p-2626-96000] Error 1
gmake: *** [fate-lavr-resample-s32p-8000-2626] Error 1
gmake: *** [fate-lavr-resample-s32p-44100-2626] Error 1
gmake: *** [fate-lavr-resample-s32p-44100-8000] Error 1
gmake: *** [fate-lavr-resample-s32p-48000-2626] Error 1
gmake: *** [fate-lavr-resample-s32p-96000-2626] Error 1
gmake: *** [fate-lavr-resample-s32p-96000-8000] Error 1

You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-bugs/attachments/20180313/25a822e7/attachment.html>

More information about the libav-bugs mailing list