[vorbis-dev] EGCS broken; tested 2.95 through CVS current

Monty xiphmont at xiph.org
Thu Oct 14 20:48:05 PDT 1999



OK, I've learned more.

There are two seperate floating point issues running around.  One is an FP
stack overflow due to a bug in glibc; The 'log()' function and several other
functions in glibc are inline assembly that use hardwired calls to add numbers
to the FP stack.  They doesn't alert the compiler that an extra stack entry is
used, and so the stack overflows if gcc just happened to use all eight stack
entries before a call to log().

We're hitting this first problem; the math inline header files *are* at fault.
I have read the assembly, found the bug in the headers, and tested the
theoretical fixes.  

The file in question is different, but for glibc2.0 and 2.1, the same assembly
is present.  Things worked in gcc 2.7.2.2 only because inlining the math
functions is explicitly disabled for gcc <= 2.7.x.  I would expect a glibc
system with gcc 2.8 to also break.  For the record, -D__NO_MATH_INLINES will
correct the problem.  The real solution is to fix glibc of course ;-)

Sigh.  Hand-rolled assembly has caused Linux more trouble in the past two years....

The second FP problem is a much more sinister looking bug that no one on the
devlist has been able to adequately explain.  Assignments to the FP stack end
up storing 'NaN' instead of the requested value.  We don't seem to hit this.

In any case, I'll roll the test case (it'll be easy now), and report the bug.

Monty

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/



More information about the Vorbis-dev mailing list