glibc 2.0.7 / egcs 1.0.3a inline pow() function bug.

Jeffrey A Law law@cygnus.com
Thu Aug 20 16:17:00 GMT 1998


  In message < 199808201838.OAA04576@axp745.gsfc.nasa.gov >you write:
  > 
  > The following code crashes with a seg. fault under glibc 2.0.7 / egcs
  > 1.0.3a when the optimization is turn-on.  It seems to be a problem in
  > the inline version of pow() in /usr/include/__math.h.
  > 
  > #include <math.h> 
  > 
  > void e(float *a) { }
  > 
  > void 
  > b()
  > {
  >   float z;
  > 
  >   z = 0.0; 
  >   e(&z); 
  >   pow(1.0, 2.2);
  > }
  > 
  > int main() {  b(); }
  > ---------------------------
  > 
  > Has this been reported before?  Is it a known problem?  It there a
  > quick change I can make to the __math.h file to fix it?  It this
  > a glibc2 problem or an egcs problem or both?
It is highly likely this is a known bug in egcs-1.0.3a.  egcs-1.0.3a has a
bug which seems to be consistently tickled by the inline pow from glibc2.

We have fixed this bug for the upcoming egcs-1.1 release.

Jeff



More information about the Gcc-bugs mailing list