[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

SIGFPE trapping on HPPA (was: Yorick FTBFS: DM needs access to HPPA machine)

[1] http://packages.debian.org/sid/yorick
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559406


Thanks to access to Frans I have been able to test a little bit more this issue.

It turns out the Yorick code is able to trap SIGFPE when it is triggered by an integer division (1/0) but not when it is triggered by a floating point division (1./0.).

In the former case, Yorick correctly signals the exception to the user with a Yorick error message and stops to wait for input, whereas in the latter it just dies with the single line "Floating point exception".

Under some circumstances (when and integer SIGFPE has been raised previously), I have been able to have my handler output a short message, but then it loops (this short message is repeated indefinitely). Calling feclearexcepts() before outputting this message did not help: when attempting a floating-point division by zero, either yorick dies or the handler loops. The first three lines of the handler on this test case are:
  printf("in u_sigfpe\n");

The handler is setup using signal(2):
  signal(SIGFPE, &u_sigfpe)

HPPA is the only architecture so far which exhibits this behaviour.

Does anyone has an idea of what I could do to fix this? Is there something specific in the way HPPA handles SIGFPE trapping? Why is it different between integer SIGFPE and floating SIGFPE?

Best regards, Thibaut.

Reply to: