[FFmpeg-trac] #272(avcodec:open): altivec specific code segfaults on ppc when compiled with --enable-pic

FFmpeg trac at avcodec.org
Thu Jun 9 08:51:28 CEST 2011


#272: altivec specific code segfaults on ppc when compiled with --enable-pic
-----------------------+----------------------
Reporter:  kim         |       Owner:
    Type:  defect      |      Status:  open
Priority:  normal      |   Component:  avcodec
 Version:  git-master  |  Resolution:
Keywords:  ppc, PIC    |  Blocked By:
Blocking:              |  Reproduced:  0
Analyzed:  0           |
-----------------------+----------------------

Comment (by kim):

 Hi again,
 the offending commit is this one (hurray for git bissect):

 -------------------
 commit a46b84d1204d3cd2de14f08de29afee08f8f86d0
 Author: Måns Rullgård <mans at mansr.com>
 Date:   Sun Jul 4 18:33:47 2010 +0000

     PPC: convert Altivec FFT to pure assembler

     On PPC a leaf function has a 288-byte red zone below the stack
 pointer,
     sparing these functions the chore of setting up a full stack frame.

     When a function call is disguised within an inline asm block, the
     compiler might not adjust the stack pointer as required before a
     function call, resulting in the red zone being clobbered.

     Moving the entire function to pure asm avoids this problem and also
     results in somewhat better code.

     Originally committed as revision 24044 to
 svn://svn.ffmpeg.org/ffmpeg/trunk
 ---------------------

 Reverting this commit on top of master (which is
 f9ecb849ef39bc337d9439b829fe08da5c95cc3d at the moment) fixes the issue
 for me. I guess it went unnoticed for so long because
 1) ppc is pretty rare these days
 2) other software using ffmpeg as a shared library (thus using -fPIC) used
 to embbed it and link statically until fairly recently, or just shipped
 older versions.

 (From the commit message though, reverting might introduce some other bugs
 that the commit fixed).

-- 
Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/272#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list