[FFmpeg-devel] [PATCH] fix h264_deblock_sse2.asm segfaults on clang/x86-32

Michael Niedermayer michaelni
Thu Sep 2 16:28:18 CEST 2010


On Thu, Sep 02, 2010 at 08:15:32AM -0400, Ronald S. Bultje wrote:
> Hi Michael,
> 
> On Thu, Sep 2, 2010 at 4:44 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > I dont mind if people disable optimized code for clang or add such
> > workarounds conditional on the compiler being clang.
> 
> Well, the "problem" is that the compiler isn't clang. The compiler is
> yasm, the calling code is clang-compiled. (Same bug likely applies to
> old icc and some of the other "exotic" compilers on fate that fail the
> h264 tests.)
> 
> If we add a config.asm that is a yasmified config.h, and have both
> define the C compiler being used to conditionally enable this
> "hack"/"fix" in deblock asm, would that be acceptable to you?

yes, of course


> 
> > But iam against such workarounds being added as if it was a bugfix
> > because once clang will be fixed all these hacks would then be forgoten
> > without ifdef clang/buggy_whatever. And there are enough hacks in the
> > code that noone knows why they where added
> 
> Doesn't svn (git) history show that?

like, listing all gcc related workaround commits or all workaround
or all hack commits?
no

even for a single line of old code it not all that rarely that noone
knows why it was done like it was done ...

yes in an ideal world you might be able to grep commit messages for
strings like hack and workaround but look just at this one
how mans argues its not a bug in the compiler
(and if its not a bug in the compiler would be no workaround)
ill leave it to your imagination how such commits could be found

compare that to greping for ifdefs on compiler related features
IMHO this is much easier and less fragile

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100902/07c2ae5a/attachment.pgp>



More information about the ffmpeg-devel mailing list