Reported by Ariel Badichi on sbcl-devel.
Using WITH-COMPILATION-UNIT to silence UNDEFINED-FUNCTION style-warnings for
forward-referenced functions was a bad idea after all: it caused cores dumped
using it to be started with **WORLD-LOCK** held by a dead thread.
...and it's not like WITH-COMPILATION-UNIT would ever get to summarize the
unit anyways the way it was used there.
Proper fix for this is to use UNDEFINED-REFERENCE-STYLE-WARNING as separate
condition class and just muffle those -- but this is too much to put in
during the freeze and will wait till after 1.0.46.
* enhancement: largefile support on Solaris.
* enhancement: SB-PROFILE:REPORT now supports :LIMIT and :PRINT-NO-CALL-LIST
arguments (lp#710017)
- * enhancement: forward referenced functions no longer cause STYLE-WARNINGS
- when running under --script. (lp#677779)
* enhancement: SB-PCL:+SLOT-UNBOUND+ is exported, making it possible to
distinguish unbound instance slots when using STANDARD-INSTANCE-ACCESS
&co. (lp#718039)
(sb!c:with-source-location (source-location)
(setf (info :source-location :variable name) source-location))
name)
-
-;;; Needs WITH-COMPILATION-UNIT, hence not in toplevel.lisp.
-(defun load-script (pathname)
- ;; WITH-COMPILATION-UNIT to avoid style-warnings for
- ;; forward-referenced functions in scripts. Needs to be around
- ;; HANDLING-END-OF-THE-WORLD so that we don't unwind from it, which
- ;; would cause a bogus complaint about a fatal error...
- (sb!xc:with-compilation-unit ()
- (handling-end-of-the-world
- (with-open-file (f pathname :element-type :default)
- (sb!fasl::maybe-skip-shebang-line f)
- (load f :verbose nil :print nil))
- (quit))))
(dolist (option options)
(process-1 option)))))
+(defun process-script (script)
+ (let ((pathname (native-pathname script)))
+ (handling-end-of-the-world
+ (with-open-file (f pathname :element-type :default)
+ (sb!fasl::maybe-skip-shebang-line f)
+ (load f :verbose nil :print nil)
+ (quit)))))
+
;; Errors while processing the command line cause the system to QUIT,
;; instead of trying to go into the Lisp debugger, because trying to
;; go into the Lisp debugger would get into various annoying issues of
(process-init-file userinit :user))
(process-eval/load-options (nreverse reversed-options))
(when script
- (load-script (native-pathname script))
+ (process-script script)
(bug "PROCESS-SCRIPT returned")))
(abort ()
:report (lambda (s)
run_sbcl --script $tmpscript
check_status_maybe_lose "--script exit status from normal exit" $? 0 "(everything ok)"
-echo '(setf *error-output* *standard-output*) (defun foo () (bar)) (defun bar () 11) (quit :unix-status (foo))'> $tmpscript
-out=`run_sbcl --script $tmpscript`
-check_status_maybe_lose "--script exit status from normal exit" $? 11 "(everything ok)"
-test -z "$out"
-check_status_maybe_lose "--script forward-referenced functions" $? 0 "(everything ok)"
-
rm -f $tmpscript
exit $EXIT_TEST_WIN
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.45.34"
+"1.0.45.35"