[FFmpeg-trac] #7751(build system:new): Runtime CPU detection on 32-bit PowerPC isn't helpful

FFmpeg trac at avcodec.org
Fri Feb 22 21:36:11 EET 2019


#7751: Runtime CPU detection on 32-bit PowerPC isn't helpful
--------------------------------------+----------------------------------
             Reporter:  awilfox       |                     Type:  defect
               Status:  new           |                 Priority:  normal
            Component:  build system  |                  Version:  4.1
             Keywords:                |               Blocked By:
             Blocking:                |  Reproduced by developer:  0
Analyzed by developer:  0             |
--------------------------------------+----------------------------------
 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
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7751>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list