Bad backtrace for floating point exceptions

Bug #1133020 reported by Stas Boukarev on 2013-02-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Low
Unassigned

Bug Description

on x86-64:
(expt 10d0 100000)

  0: (SB-SYS:INVOKE-INTERRUPTION #<CLOSURE (FLET SB-UNIX::INTERRUPTION :IN SB-SYS:ENABLE-INTERRUPT) {7FFFEDCECB2B}>) [tl,external]
  1: ((FLET SB-UNIX::RUN-HANDLER :IN SB-SYS:ENABLE-INTERRUPT) 8 #.(SB-SYS:INT-SAP #X7FFFEDCECEF0) #.(SB-SYS:INT-SAP #X7FFFEDCECDC0))
  2: ("foreign function: call_into_lisp")
  3: ("foreign function: funcall3")
  4: ("foreign function: interrupt_handle_now")
  5: ("foreign function: interrupt_handle_now_handler")

Stas Boukarev (stassats) wrote :

SBCL uses libm's pow for implementing EXPT. The backtrace in the description is from glibc 2.13.

Glibc 2.17 gives a better backtrace:
  0: ("bogus stack frame")
  1: (SIMPLE-EVAL-IN-LEXENV (EXPT 10.0d0 100000) #<NULL-LEXENV>)
  2: (EVAL (EXPT 10.0d0 100000))

FWIW, i see the same on x86_64 debian, libc-bin 2.19-18+deb8u6, sbcl "1.2.4.debian" and "1.3.8.46.hu.dwim.4-da817a7", both with slime:

arithmetic error FLOATING-POINT-OVERFLOW signalled
   [Condition of type FLOATING-POINT-OVERFLOW]

Restarts:
 2: RETRY Retry SLIME REPL evaluation request.
 1: *ABORT Return to SLIME's top level.
 0: ABORT abort thread (#<THREAD "repl-thread" RUNNING {1008CF0033}>)

Backtrace:
  0: ((FLET SB-UNIX::RUN-HANDLER :IN SB-SYS:ENABLE-INTERRUPT) 8 #.(SB-SYS:INT-SAP #X7FFFE48F59B0) #.(SB-SYS:INT-SAP #X7FFFE48F5880))
  1: ("foreign function: call_into_lisp")
  2: ("foreign function: funcall3")
  3: ("foreign function: interrupt_handle_now")
  4: ("foreign function: interrupt_handle_now_handler")

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers