out-of-extent return not checked in safe code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Confirmed
|
Medium
|
Unassigned |
Bug Description
BUGS #422
(declaim (optimize safety))
(funcall (catch 't (block nil (throw 't (lambda () (return))))))
behaves ...erratically. Reported by Kevin Reid on sbcl-devel
2007-07-06. (We don't _have_ to check things like this, but we
generally try to check returns in safe code, so we should here too.)
This comment from ir2tran.lisp seem pertinent:
;;; Convert a non-local lexical exit. First find the NLX-INFO in our
;;; environment. Note that this is never called on the escape exits
;;; for CATCH and UNWIND-PROTECT, since the escape functions aren't
;;; IR2 converted.
(defun ir2-convert-exit (node block)
(declare (type exit node) (type ir2-block block))
(let* ((nlx (exit-nlx-info node))
(loc (find-in-physenv nlx (node-physenv node)))
(temp (make-stack-
(value (exit-value node)))
(if (nlx-info-safe-p nlx)
(vop value-cell-ref node block loc temp)
(emit-move node block loc temp))
(if value
(let ((locs (ir2-lvar-locs (lvar-info value))))
(vop unwind node block temp (first locs) (second locs)))
(let ((0-tn (emit-constant 0)))
(vop unwind node block temp 0-tn 0-tn))))
(values))
Changed in sbcl: | |
importance: | Undecided → Medium |
Changed in sbcl: | |
importance: | Medium → High |
description: | updated |
Changed in sbcl: | |
assignee: | nobody → rosa maria (rprosamaria383) |
Changed in sbcl: | |
assignee: | rosa maria (rprosamaria383) → nobody |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
status confirmed
-----BEGIN PGP SIGNATURE----- getfiregpg. org
I5T0ACgkQbSpkIA KPfsVA0ACgnt2KI V87NFZAYlI83oFR DBUJ DBW/fZ/ 6TkPLi2pgfs9VOJ
Version: GnuPG v1.4.9 (Darwin)
Comment: http://
iEYEARECAAYFAkl
/WwAn09b2+
=3nyL
-----END PGP SIGNATURE-----