[FFmpeg-devel] FATE & Regressions (and PPC is broken)

Michael Niedermayer michaelni
Sun Mar 16 12:27:53 CET 2008


On Sun, Mar 16, 2008 at 10:25:50AM +0100, Vitor Sessak wrote:
> Hi
> 
> Michael Niedermayer wrote:
> > On Sun, Mar 16, 2008 at 12:25:41AM +0100, Vitor Sessak wrote:
> >> Hi
> >>
> >> Mike Melanson wrote:
> >>
> >> [...]
> >>
> >>> x86_32/icc:
> >>> This is weird; if I build icc and then run 'make test', it crashes here
> >>> (tried twice with a 'make clean' in between):
> >>> "/home/melanson/ffmpeg/build-icc"/tests/audiogen tests/asynth1.sw
> >>> Segmentation fault (core dumped)
> >>> make: *** [tests/asynth1.sw] Error 139
> >> This can be fixed with the following patch, but I don't know if it is the 
> >> right fix.
> > 
> > Could you shed some light on the question where it crashes and why the
> > patch fixes it?
> > 
> 
> In the code
> 
> > 
> > static int int_cos(int a)
> > {
> >     int neg, v, f;
> >     const unsigned short *p;
> > 
> >     a = a & (FRAC_ONE - 1); /* modulo 2 * pi */
> >     if (a >= (FRAC_ONE / 2))
> >         a = FRAC_ONE - a;
> >     neg = 0;
> >     if (a > (FRAC_ONE / 4)) {
> >         neg = -1;
> >         a = (FRAC_ONE / 2) - a;
> >     }
> > 
> >     p = cos_table + (a >> CSHIFT);
> 
> When a is negative, (a >> CSHIFT) can be negative (not only in icc but 
> in gcc too). So p[0] will dereference an invalid pointer.

a cannot be negative after
a = a & (FRAC_ONE - 1);

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

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080316/737827d5/attachment.pgp>



More information about the ffmpeg-devel mailing list