Bug#515949: More info

Erik de Castro Lopo erikd at mega-nerd.com
Wed Mar 18 21:11:29 UTC 2009


I took the source code from vorbis SVN head and got access to a 
armel machine provided by Martin Guy.

I then added printf statments to the code and compare the output
on the armel machine with that of and amd64 machine which was also
giving the same results as and i386 machine.

After much debugging it turns out that gcc was producing incorrect
code for some usages of the standard max macro:

  #define max(x,y)  ((x) < (y) ? (y) : (x))

This can be verified on any machine as follows:

    bzr branch  http://www.mega-nerd.com/Bzr/vorbis-bugfix
    cd vorbis-bugfix/
    ./autogen.sh
    ./etest.sh

On amd64 and i386 I get:

        vorbis_44100.ogg     :

    _ve_envelope_search      248 : first    0    last  140
    _ve_amp                  188 : postmax       0.0000    premax  -99999.0000
    _ve_amp                  193 : filters[0].ampbuf[15] ->       0.0000
    _ve_amp                  193 : filters[0].ampbuf[14] ->       0.0000
    _ve_amp                  197 : postmax       0.0000    premax       0.0000
    _ve_envelope_search      248 : first  138    last  138
    _ve_envelope_search      248 : first  136    last  136
    _ve_envelope_search      248 : first  127    last  127
    _ve_envelope_search      248 : first  111    last  111
    _ve_envelope_search      248 : first   95    last   95
    ok

and on arm I get:

    _ve_envelope_search      246 : first    0    last  140
    _ve_envelope_search      256 : i  0    j     0    searchstep  64
    _ve_amp                  186 : postmax       0.0000    premax  -99999.0000
    _ve_amp                  191 : filters[0].ampbuf[15] ->       0.0000
    _ve_amp                  191 : filters[0].ampbuf[14] ->       0.0000
    _ve_amp                  195 : postmax       0.0000    premax  -99999.0000
    Ooops, premax should be zero here!!!!!

Erik
-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"Java is, in many ways, C++--." -- Michael Feldman





More information about the pkg-xiph-maint mailing list