[FFmpeg-trac] #8073(undetermined:new): Segfault on macOS 10.15 "Catalina": stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT); libdyld.dylib`stack_not_16_byte_aligned_error
FFmpeg
trac at avcodec.org
Sun Aug 11 23:17:48 EEST 2019
#8073: Segfault on macOS 10.15 "Catalina": stop reason = EXC_BAD_ACCESS
(code=EXC_I386_GPFLT); libdyld.dylib`stack_not_16_byte_aligned_error
-------------------------------------+-------------------------------------
Reporter: skyzyx | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: catalina | Blocked By:
segfault |
stack_not_16_byte_aligned_error |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
=== Summary of the bug:
ffmpeg segfaults on ANY execution under macOS 10.15 "Catalina" (Developer
Preview 19A526h).
For context (don't know if it's related or not), this is the first macOS
release that will no longer run ANY 32-bit code.
Attempted this on tags 4.1.3, 4.1.4, and 4.2; latest master (commit
`da8936969fe695a042282d5686e12227745d299a` as of this writing). Same
compilation commands do not result in segfault in macOS 10.14.6 "Mojave".
=== How to reproduce:
In an attempt to pare down the options to the smallest possible set in
order to identify the source of the bug, I've got this:
{{{
$ MACOSX_DEPLOYMENT_TARGET=10.15 \
LIBFFI_CFLAGS=-I/usr/include/ffi \
LIBFFI_LIBS=-lffi \
GLIB_CFLAGS="-I/usr/local/include/glib-2.0
-I/usr/local/lib/glib-2.0/include" \
GLIB_LIBS="-lglib-2.0 -lgio-2.0" \
CFLAGS=`freetype-config --cflags` \
LDFLAGS=`freetype-config --libs`
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/opt/X11/lib/pkgconfig
\
./configure \
--arch=x86_64 \
--cc=/usr/bin/clang \
--disable-all \
--disable-everything \
--disable-stripping \
--enable-debug=3 \
&& \
make -j$(nproc) && \
make install
}}}
(tested WITH and WITHOUT the environment variables preceding
`./configure`)
Results in:
{{{
$ ffmpeg
Segmentation fault: 11
}}}
Based on some searching, I ran the following in an attempt to debug
further.
{{{
$ lldb $(which ffmpeg)
(lldb) target create "/usr/local/bin/ffmpeg"
Current executable set to '/usr/local/bin/ffmpeg' (x86_64).
(lldb) run
Process 95311 launched: '/usr/local/bin/ffmpeg' (x86_64)
Process 95311 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=EXC_I386_GPFLT)
frame #0: 0x00007fff6e08c366
libdyld.dylib`stack_not_16_byte_aligned_error
libdyld.dylib`stack_not_16_byte_aligned_error:
-> 0x7fff6e08c366 <+0>: movdqa %xmm0, (%rsp)
0x7fff6e08c36b <+5>: int3
0x7fff6e08c36c <+6>: nop
0x7fff6e08c36d <+7>: nop
Target 0: (ffmpeg) stopped.
(lldb) run --help
There is a running process, kill it and restart?: [Y/n] y
Process 95311 exited with status = 9 (0x00000009)
Process 95317 launched: '/usr/local/bin/ffmpeg' (x86_64)
Process 95317 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=EXC_I386_GPFLT)
frame #0: 0x00007fff6e08c366
libdyld.dylib`stack_not_16_byte_aligned_error
libdyld.dylib`stack_not_16_byte_aligned_error:
-> 0x7fff6e08c366 <+0>: movdqa %xmm0, (%rsp)
0x7fff6e08c36b <+5>: int3
0x7fff6e08c36c <+6>: nop
0x7fff6e08c36d <+7>: nop
Target 0: (ffmpeg) stopped.
}}}
=== Bug reporting details
http://ffmpeg.org/bugreports.html references `gdb`, which I'd be happy to
install, but based on my reading it sounds like `llvm`, `clang`, and
`lldb` have replaced `gcc` and `gdb` (at least on macOS).
This set of compilation commands does not appear to produce `ffmpeg_g`.
Could not find any matches using:
{{{
find . -type f -name "*ffmpeg_g*"
}}}
Valgrind does not appear to support ''current'' macOS (10.14) nor the
latest dev preview (10.15).
I am not a C developer, but I am happy to provide any additional
information about my environment if instructions can be provided.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8073>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list