Printing escaped restart causes memory fault

Bug #1737169 reported by Christian Pape on 2017-12-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Wishlist
Unassigned

Bug Description

;; what I did

CL-USER> (with-simple-restart (foo "")
           (find-restart 'foo))
; Evaluation aborted on #<SB-SYS:MEMORY-FAULT-ERROR {10293B7053}>.
CL-USER>

;; the error message

Unhandled memory fault at #x35.
   [Condition of type SB-SYS:MEMORY-FAULT-ERROR]

;;from the inferior lisp buffer

CORRUPTION WARNING in SBCL pid 7762(tid 0x803410c00):
Memory fault at 0x1d (pc=0x21b4bc5d, sp=0x805966000)
The integrity of this image is possibly compromised.
Continuing with fingers crossed.

;;affects at least SBCL 1.4.1 on Linux, 1.4.2 on FreeBSD, several implementations

Jan Moringen (scymtym) on 2017-12-08
summary: - find-restart crashes SBCL image
+ Printing escaped restart causes memory fault
Changed in sbcl:
importance: Undecided → Wishlist
Jan Moringen (scymtym) wrote :

Note that restarts must be assumed to have dynamic extent:

> An implementation is free to implement a restart in whatever manner is most convenient; a restart
> has only dynamic extent relative to the scope of the binding form which establishes it.

http://www.lispworks.com/documentation/HyperSpec/Body/t_rst.htm#restart

Changed in sbcl:
status: New → Confirmed
Stas Boukarev (stassats) wrote :

I don't this could ever be solved without breaking dynamic-extent. Returning from a function could be caught sometimes at compile time, but more elaborate escapes via closures are untraceable.

Changed in sbcl:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers