qa-float crash

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Lutz,

GOOD NEWS!

If got it running (tested it on 10.1.4) but will work on a clean 10.1.6 too.
The SIGFPE handler can be removed, im unable to test it on a different PC btw
at the moment..

Code: Select all

newLISP v.10.1.4 on OS/2 IPv4, execute 'newlisp -h' for more info.

(MAIN)-> (sqrt -1)
nan
(MAIN)-> (log 0)
-inf
(MAIN)-> (log -1)
nan
(MAIN)-> (atan -1)
-0.7853981634
(MAIN)-> (mod -1)
-1
(MAIN)-> (% -1 0)

ERR: division by zero in function %
(MAIN)-> (/ 0 0)

ERR: division by zero in function /
(MAIN)->

This is what I added to the newlisp.c (above inside main())
I did test befor this section below, I dont know what I did differently
but now its working..

Code: Select all

/* Unmask all floating-point exceptions. */
#ifdef OS2
/* _clear87(); */
 _fpreset(); 
/* _control87( PC_53, MCW_RC ); */
#endif


initLocale();
initNewlispDir();
IOchannel = stdin;

initialize();
initStacks();
initDefaultInAddr(); /* nl-sock.c */

Now my main thought still stays.. whats the cause of this behaviour..
(the 87? the OS/2 Kernel? the Libc/gcc? its again in the dark ;-)

Anyway it works now overhere without Stack swapping..


PS: perhpas this should be default anyway in newlisp for all machines?
As it might be a hardware issue..
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

The latest 10.1.6 is in the usual location for you, perhaps you can work the changes into it then send me a zip of newlisp.c to: lutz nuevatec com

Just search for all: OS2 in that file, I assume that all the old #ifdefs OS2 referring to SIGFPE can be removed?

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

I have put the fixed files link in a PM to you..
Ill email them too ;-)


Last bumped by newdep on Wed Nov 03, 2010 9:15 pm.
-- (define? (Cornflakes))

Locked