Closed Bug 333 Opened 26 years ago Closed 26 years ago

Floating point exeption, core dump

Categories

(NSPR :: NSPR, defect, P3)

HP
HP-UX
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jorgen, Assigned: wtc)

References

()

Details

Attachments

(1 obsolete file)

Created by Jörgen Jonsson (jorgen@saitek.se) on Thursday, May 7, 1998 5:01:39 AM PDT
Additional Details :
I compiled the code from 1998-04-29 and when I try to start
mozilla-export it just core dumps.
Jörgen Jonsson
Saitek AB
Sollentuna
Sweden
jorgen@saitek.se
Updated by Wan-Teh Chang (wtc@netscape.com) on Thursday, May 7, 1998 11:08:43 PM PDT
Additional Details :
This may be due to the SIGFPE signal generated by jspai.c.
The Javascript people are aware of the SIGFPE problem.
There is a SIGFPE handler in mozilla/nsprpub/pr/src/md/unix/hpux.c,
but apparently it doesn't work sometimes.

Added myself to the CC list.
Updated by Brian Ostrom (briano@netscape.com) on Monday, July 13, 1998 3:25:08 PM PDT
Additional Details :
Is this still a problem?  If so, can you give me a traceback
from gdb (or whatever)?  Then I can forward this bug to the
right person.  Thanks.
Component: Macintosh FE
I solved this by turning off the FPE handler, but I'm not
sure it's the "best" way to do it. The URL I've quoted contains the
full set of HP-UX context diffs for the 28th July 1998 release of Mozilla
(it includes the context diffs below of ccourse). I'll leave the Mozilla
folks to work out this problem - without this patch, Mozilla bombs
completely on HP-UX...

*** nsprpub/pr/src/md/unix/hpux.c.cln   Tue Jul 28 05:43:38 1998
--- nsprpub/pr/src/md/unix/hpux.c       Mon Aug  3 13:43:53 1998
***************
*** 28,33 ****
--- 28,36 ----
  #include <signal.h>
  #include <values.h>

+ /* Comment this out to try a build without installing an FPE handler */
+ #define INSTALL_FPE_HANDLER
+
  /*
  ** On HP-UX we need to define a SIGFPE handler because coercion of a
  ** NaN to an int causes SIGFPE to be raised. Thanks to Marianne
***************
*** 41,46 ****
--- 44,50 ----
  ** so we also need to use the sigvector() interface.
  */

+ #ifdef INSTALL_FPE_HANDLER
  #if defined(_PR_DCETHREADS) || defined(HPUX9)
  static void
  CatchFPE(int sig, int code, struct sigcontext *scp)
***************
*** 123,139 ****
  #endif /* _PR_DCETHREADS || HPUX9 */

  #if defined(HPUX10_30) || defined(HPUX11)
!     fesettrapenable(FE_INVALID);
  #else
!     fpsetmask(FP_X_INV);
  #endif
  }

  #if !defined(PTHREADS_USER)

  void _MD_EarlyInit(void)
  {
      _MD_hpux_install_sigfpe_handler();

  #ifndef _PR_PTHREADS
      /*
--- 127,146 ----
  #endif /* _PR_DCETHREADS || HPUX9 */

  #if defined(HPUX10_30) || defined(HPUX11)
!     fesettrapenable(fegettrapenable() & (~(FE_INVALID)));
  #else
!     fpsetmask(fpgetmask() & (~(FP_X_INV)));
  #endif
  }
+ #endif /* INSTALL_FPE_HANDLER */

  #if !defined(PTHREADS_USER)

  void _MD_EarlyInit(void)
  {
+ #ifdef INSTALL_FPE_HANDLER
      _MD_hpux_install_sigfpe_handler();
+ #endif /* INSTALL_FPE_HANDLER */

  #ifndef _PR_PTHREADS
      /*
Assignee: briano → wtc
Component: Macintosh FE → NSPR
Wan-Teh, this looks like one for you (NSPR-related).
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
This has been fixed in the CVS tree.

First of all, Javascript was fixed so that it
no longer casts a NaN value to an int.  So
Javascript does not generate SIGFPE now.

Then, I deleted the now unnecessary SIGFPE
handler from NSPR.
Status: RESOLVED → VERIFIED
marking verified against old code base
NSPR now has its own Bugzilla product.  Moving this bug to the NSPR product.
Attached patch foopy (obsolete) — Splinter Review
603.16 MB (100.0%) -- explicit
ÃÂâÃÂÃÂÃÂÃÂÃÂâÃÂÃÂÃÂÃÂÃÂâÃÂÃÂÃÂÃÂ220.51 MB (36.56%) -- js-non-window
ÃÂâÃÂÃÂÃÂà ÃÂâÃÂÃÂÃÂÃÂÃÂâÃÂÃÂÃÂÃÂÃÂâÃÂÃÂÃÂÃÂ143.30 MB (23.76%) -- compartments
ÃÂâÃÂÃÂÃÂà ÃÂâÃÂÃÂÃÂà ÃÂâÃÂÃÂÃÂÃÂÃÂâÃÂÃÂÃÂÃÂÃÂâÃÂÃÂÃÂÃÂ126.52 MB (20.98%) -- non-window-global
ÃÂâÃÂÃÂÃÂà ÃÂâÃÂÃÂÃÂà ÃÂâÃÂÃÂÃÂà ÃÂâÃÂÃÂÃÂÃÂÃÂâÃÂÃÂÃÂÃÂÃÂâÃÂÃÂÃÂÃÂ106.60 MB (17.67%) ++ (574 tiny)
ÃÂâÃÂÃÂÃÂà ÃÂâÃÂÃÂÃÂà ÃÂâÃÂÃÂÃÂà ÃÂâÃÂÃÂÃÂÃÂÃÂâÃÂÃÂÃÂÃÂÃÂâÃÂÃÂÃÂÃÂÃÂâÃÂÃÂÃÂÃÂ19.91 MB (03.30%) -- compartment([System Principal], jar:file:///home/jdm/.mozilla/firefox/bnzuvz6s.default/extensions/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D.xpi!/bootstrap.js (from: resource:///modules/XPIProvider.jsm:3626))
ÃÂâÃÂÃÂÃÂÃÂ
Comment on attachment 661696 [details] [diff] [review]
foopy

Sorry.
Attachment #661696 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: