Xref: news2.mv.net comp.os.msdos.djgpp:3390 From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: Re: libm.a/linker *BUG* with test program Date: Fri, 03 May 1996 10:25:43 +0100 Organization: Lehrstuhl fuer Stroemungsmechanik Lines: 42 Message-ID: <3189D117.41C6@LSTM.Ruhr-UNI-Bochum.De> References: <4mb7ob$3lf AT crc-news DOT doc DOT ca> NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Richard Young wrote: > > I've discovered the following incorrect behavior with DJGPP version 2. > The included test program illustrates the symptom of the behavior which > seems to be as a result of including the math library. When I don't > include libm.a the program does not crash. When I include libm.a the > program crashes on the 3rd pow() call. It seems that it also is related > to calling ldexp() too since just calling pow() many times works fine. > I tried your test program and found the same error. It looks as if ldexp() doesn't clean up the co-proc stack. It leaves the "6" on the stack and after some calls the stack is full. > Furthermore, when I run another program (gcc, symify etc.) immediately > after running the crashing test program then the other program bombs > with a SIGFPE exit as well. Invoking the other program once more > returns it to correct operation. > Probably because the coproc is not reset after the crash or before starting the next program by the startup code (Just a guess), so the next FLDP or so bombs again. -- Ciao Tom ************************************************************* * Thomas Demmer * * Lehrstuhl fuer Stroemungsmechanik * * Ruhr-Uni-Bochum * * Universitaetsstr. 150 * * D-44780 Bochum * * Tel: +49 234 700 6434 * * Fax: +49 234 709 4162 * * http://www.lstm.ruhr-uni-bochum.de/~demmer * *************************************************************