Skip to content

Commit

Permalink
parisc: clear floating point exception flag on SIGFPE signal
Browse files Browse the repository at this point in the history
Clear the floating point exception flag before returning to
user space. This is needed, else the libc trampoline handler
may hit the same SIGFPE again while building up a trampoline
to a signal handler.

Fixes debian bug #559406.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
  • Loading branch information
hdeller authored and Kyle McMartin committed May 30, 2010
1 parent d24944d commit 550f0d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/parisc/math-emu/decode_exc.c
Expand Up @@ -342,6 +342,7 @@ decode_fpu(unsigned int Fpu_register[], unsigned int trap_counts[])
return SIGNALCODE(SIGFPE, FPE_FLTINV);
case DIVISIONBYZEROEXCEPTION:
update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
Clear_excp_register(exception_index);
return SIGNALCODE(SIGFPE, FPE_FLTDIV);
case INEXACTEXCEPTION:
update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
Expand Down

0 comments on commit 550f0d9

Please sign in to comment.