SIGFPE -> ArithmeticException ?

Bryce McKinlay bryce@albatross.co.nz
Thu Jul 1 07:51:00 GMT 1999


Andrew Haley wrote:

> I don't think that there's any reason why the pthread library needs to
> be called when a SIGFPE occurs (as far as I know SIGFPE is
> synchronous) so try replacing calls to sigaction() in i386-signal.h
> with __sigaction().  This isn't an ideal solution, but it should work
> until pthreads is fixed.
>
> Here's hoping!

Yes! It works! (Using the original i386-signal.h and making this small
change) Thanks!

Now with that sorted out, can anyone tell me why the following one still
doesn't work? In this example, a SIGSEGV is never even generated:

public class NullPointer
{
  public static void main(String args[])
    {
      try
        {
          String f = null;
          System.out.println(f.toString());
          System.out.println("This should not happen!");
        }
       catch (NullPointerException x)
         {
           System.out.println("Exception generated, Good");
         }
    }
}

regards

  [ bryce ]




More information about the Java mailing list