[Ffmpeg-devel] sse sigsegv and libavcodec/wmadec.c

Michael Niedermayer michaelni
Wed Dec 6 23:23:32 CET 2006


Hi

On Wed, Dec 06, 2006 at 10:24:29PM +0100, Benjamin Larsson wrote:
> Michael Niedermayer wrote:
> 
> >Hi
> >
> >On Wed, Dec 06, 2006 at 04:29:44PM +0100, Benjamin Larsson wrote:
> >  
> >
> >>Michael Niedermayer skrev:
> >>    
> >>
> >>>Hi
> >>>
> >>>On Wed, Dec 06, 2006 at 02:35:16PM +0100, Benjamin Larsson wrote:
> >>> 
> >>>      
> >>>
> >>>>Michael Niedermayer skrev:
> >>>>   
> >>>>        
> >>>>
> >>>>>Hi
> >>>>>
> >>>>>On Fri, Dec 01, 2006 at 10:40:53PM +0100, Franz Bakan wrote:
> >>>>>
> >>>>>     
> >>>>>          
> >>>>>
> >>>>>>Hi,
> >>>>>>
> >>>>>>wmadec.c line 720 and 1110 :
> >>>>>>DECLARE_ALIGNED_16()
> >>>>>>does not work for stack-variables inside functions.
> >>>>>>(at least not for GCC 331 on OS/2) but IIRC this is a
> >>>>>>cross-platform-restriction.
> >>>>>>If I move the two declarations to the top of the file
> >>>>>>I get rid of these nasty SIGSEGVs on my PIII computer.
> >>>>>>
> >>>>>>Please patch
> >>>>>>  
> >>>>>>       
> >>>>>>            
> >>>>>>
> >>>>>patch rejected not thread safe
> >>>>>
> >>>>>furthermore if the compiler cannot gurantee the specfied alignment then 
> >>>>>it
> >>>>>has to fail hard not randomly provide less alignemnt, this is a compiler 
> >>>>>bug
> >>>>>(= generates invalid code)
> >>>>>
> >>>>>[...]
> >>>>>
> >>>>>     
> >>>>>          
> >>>>>
> >>>>Hi, do you have any good suggestion how this can be fixed without fixing 
> >>>>the compiler. This affects all codecs that needs aligned float buffers 
> >>>>when using sse on windows (and other platforms). We could try to 
> >>>>manually align the contexts (hacky but could work) or should we disable 
> >>>>sse on platforms with broken compilers ?
> >>>>   
> >>>>        
> >>>>
> >>>why exactly does gcc on windows fail to provide the specified alignment 
> >>>while
> >>>it works on linux? are all gcc versions affected?
> >>>if its just gcc 3 then id say drop official gcc 3 support for windows
> >>>
> >>>[...]
> >>> 
> >>>      
> >>>
> >>It fails to respect the align attribute in structs, so when properly 
> >>aligning a codec context with malloc the actual struct members don't get 
> >>aligned properly. I don't know exactly what versions are affected, but 
> >>this is causing problems for gcc 2.95 on BeOS also.
> >>    
> >>
> >
> >order struct members so that correct alignment is provided if everything
> >gets packed
> >
> >[...]
> >
> >  
> >
> I might have been wrong, I think it can't align the stackframe
> variables. One solution would be to move them to the context if that is
> an acceptable solution.

same question why cant to align the stackframe while it apparently can on
linux?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali




More information about the ffmpeg-devel mailing list