Re: OMG, -10==10 in linux! (with gcc prior to 20071117)

2007-11-21 Thread Alexander E. Patrakov
I wrote: > The only affected package on the LiveCD is libtheora-1.0alpha7, file > lib/pp.c, lines 363 and 383. According to the conversation on #theora, this is dead code. Postprocessing is disabled by default, with no API to enable it. -- Alexander E. Patrakov -- http://linuxfromscratch.org/ma

Re: OMG, -10==10 in linux! (with gcc prior to 20071117)

2007-11-21 Thread Alexander E. Patrakov
2007/11/21, Bruce Dubbs <[EMAIL PROTECTED]>: > Well, we only have xmms in BLFS and it is out of date. They just > released a new xmms last week (after four years). > > I was curious and looked at the xmms source for both 1.2.10 and 1.2.11, > but a grep couldn't find a use of abs() times a negative

Re: OMG, -10==10 in linux! (with gcc prior to 20071117)

2007-11-21 Thread Bruce Dubbs
Matthew Burgess wrote: > On Wed, 21 Nov 2007 15:30:45 +0500, "Alexander E. Patrakov" > <[EMAIL PROTECTED]> wrote: > >> The only affected package on the LiveCD is libtheora-1.0alpha7, >> file lib/pp.c, lines 363 and 383. This piece of code does deringing >> of the image, thus, the effect is expecte

Re: OMG, -10==10 in linux! (with gcc prior to 20071117)

2007-11-21 Thread Matthew Burgess
On Wed, 21 Nov 2007 15:30:45 +0500, "Alexander E. Patrakov" <[EMAIL PROTECTED]> wrote: > The only affected package on the LiveCD is libtheora-1.0alpha7, file > lib/pp.c, lines 363 and 383. This piece of code does deringing of the > image, thus, the effect is expected to be visible with anime and

Re: OMG, -10==10 in linux! (with gcc prior to 20071117)

2007-11-21 Thread Alexander E. Patrakov
2007/11/21, Bruce Dubbs <[EMAIL PROTECTED]>: > Alexander E. Patrakov wrote: > > > I will do a local build of the LiveCD with a patched gcc. The patch is > > different from the official fix: I added a warning that fires if gcc > > sees negative_const * abs(something). The intention is to grep throug

Re: OMG, -10==10 in linux! (with gcc prior to 20071117)

2007-11-20 Thread Bruce Dubbs
Alexander E. Patrakov wrote: > I will do a local build of the LiveCD with a patched gcc. The patch is > different from the official fix: I added a warning that fires if gcc > sees negative_const * abs(something). The intention is to grep through > the logs for this new warning and thus count all c

Re: OMG, -10==10 in linux! (with gcc prior to 20071117)

2007-11-20 Thread Alexander E. Patrakov
2007/11/21, Matthew Burgess <[EMAIL PROTECTED]>: > But see http://www.ussg.iu.edu/hypermail/linux/kernel/0711.2/1296.html - the > kernel uses it's own abs macro, so GCC never sees the call to abs(). > Therefore the kernel tarball isn't a suitable candidate to try finding > instances of this bug

Re: OMG, -10==10 in linux! (with gcc prior to 20071117)

2007-11-20 Thread mjlynch
I just tried this with 4.0.3, 3.2.2, and 3.4.2, and the problem is in all of those versions as well. -- Original message -- From: Matthew Burgess <[EMAIL PROTECTED]> > > On Tue, 20 Nov 2007 12:06:54 -0600, Bruce Dubbs <[EMAIL PROTECTED]> wrote: > > Alexander E. Pat

Re: OMG, -10==10 in linux! (with gcc prior to 20071117)

2007-11-20 Thread Bruce Dubbs
Matthew Burgess wrote: > I think a patch would be the safest bet, if only to save those that > like typing in the commands by hand some trouble. > >> Incorporating the patch in -dev is easy enough, but how should we >> phrase the errata page? > > If we do put this into an errata, I think we'd ne

Re: OMG, -10==10 in linux! (with gcc prior to 20071117)

2007-11-20 Thread Matthew Burgess
On Tue, 20 Nov 2007 12:06:54 -0600, Bruce Dubbs <[EMAIL PROTECTED]> wrote: > Alexander E. Patrakov wrote: >> Code from http://lkml.org/lkml/2007/11/19/493: >> >> #include >> #include >> >> int main( void ) >> { >> int i=2; >> if( -10*abs (i-1) == 10*abs(i-1) ) >> printf ("OMG,-10==10 in l

Re: OMG, -10==10 in linux! (with gcc prior to 20071117)

2007-11-20 Thread Bruce Dubbs
Alexander E. Patrakov wrote: > Code from http://lkml.org/lkml/2007/11/19/493: > > #include > #include > > int main( void ) > { > int i=2; > if( -10*abs (i-1) == 10*abs(i-1) ) > printf ("OMG,-10==10 in linux!\n"); > else > printf ("nothing special here\n") ; > return 0 ; > } > >

OMG, -10==10 in linux! (with gcc prior to 20071117)

2007-11-20 Thread Alexander E. Patrakov
Code from http://lkml.org/lkml/2007/11/19/493: #include #include int main( void ) { int i=2; if( -10*abs (i-1) == 10*abs(i-1) ) printf ("OMG,-10==10 in linux!\n"); else printf ("nothing special here\n") ; return 0 ; } GCC miscompiles this, because it thinks that, for builtin ab