From ae23e5b1ffe91611c2c63805c5bc481f536c226b Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tunes@google.com> Date: Sat, 16 Nov 2013 00:14:18 -0500 Subject: [PATCH] More GCL fixes: don't try overly big random numbers in WITH-TEMPORARY-FILE. Get backtraces on GCL. --- uiop/image.lisp | 3 +++ uiop/stream.lisp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/uiop/image.lisp b/uiop/image.lisp index bf802a27..d8aee971 100644 --- a/uiop/image.lisp +++ b/uiop/image.lisp @@ -122,6 +122,9 @@ This is designed to abstract away the implementation specific quit forms." :collect (list (si::ihs-fun ihs) (si::ihs-env ihs))))) (dolist (frame (nreverse backtrace)) (writeln frame :stream stream))) + #+gcl + (let ((*debug-io* stream)) + (system::simple-backtrace)) #+lispworks (let ((dbg::*debugger-stack* (dbg::grab-stack nil :how-many (or count most-positive-fixnum))) diff --git a/uiop/stream.lisp b/uiop/stream.lisp index db3c5e36..96ede3a9 100644 --- a/uiop/stream.lisp +++ b/uiop/stream.lisp @@ -557,7 +557,7 @@ Finally, the file will be deleted, unless the KEEP argument when CALL-FUNCTION'e :with prefix = (namestring (ensure-absolute-pathname (or prefix "tmp") (or directory #'temporary-directory))) :with results = () - :for counter :from (random (expt 36 8)) + :for counter :from (random (expt 36 #-gcl 8 #+gcl 6)) :for pathname = (pathname (format nil "~A~36R~@[~A~]~@[.~A~]" prefix counter suffix type)) :for okp = nil :do ;; TODO: on Unix, do something about umask -- GitLab