Opened 2 years ago
Closed 2 years ago
#7751 closed defect (invalid)
Runtime CPU detection on 32-bit PowerPC isn't helpful
Reported by: | awilfox | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | build system |
Version: | git-master | Keywords: | ppc |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
FFmpeg's runtime CPU detection correctly detects that a G3 CPU does not have AltiVec?, but since FFmpeg adds -mabi=altivec to CFLAGS when AltiVec? support is enabled, GCC generates AltiVec? instructions in function prologues, which cause it to SIGILL anyway.
How to reproduce:
% ffprobe test.png ffprobe version 4.1 Copyright (c) 2007-2018 the FFmpeg developers built with gcc 6.4.0 (Adelie 6.4.0) configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libmp3lame --enable-libmodplug --enable-librtmp --enable-libvorbis --disable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --disable-stripping --disable-static --enable-vaapi --enable-vdpau --enable-libopus --enable-libcdio --enable-ladspa --enable-lzma --enable-libspeex --enable-libfreetype --enable-libwavpack --enable-libwebp --enable-libpulse --optflags='-O2 -ggdb -mcpu=G3 -fno-omit-frame-pointer -mfpu=dp_full -g -g' --disable-debug libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 Illegal instruction
The crash happens in the prologue of sbg_read_probe:
Program received signal SIGILL, Illegal instruction. 0xb7a3b808 in sbg_read_probe (p=0xbffff44c) at libavformat/sbgdec.c:1373 (gdb) x/i $pc => 0xb7a3b808 <sbg_read_probe+12>: vxor v0,v0,v0
Change History (2)
comment:1 Changed 2 years ago by cehoyos
- Keywords ppc added
- Version changed from 4.1 to git-master
comment:2 Changed 2 years ago by cehoyos
- Resolution set to invalid
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
Please understand that using optflags makes such bug reports invalid.
If the issue is reproducible with current FFmpeg git head and an empty configuration (I suspect it is), please use --cpu=g3.