mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
Don't attempt to recover from undefined behavior in some cases
These functions can only be run in batch mode and exit Emacs on return, so nothing can be recovered. Disable unsafe recover mechanisms so that we get real failures and good stack traces on fatal signals. * lisp/emacs-lisp/bytecomp.el (batch-byte-compile) (batch-byte-recompile-directory): * lisp/emacs-lisp/ert.el (ert-run-tests-batch-and-exit) (ert-summarize-tests-batch-and-exit): Don't attempt to recover from undefined behavior.
This commit is contained in:
parent
a3a3ea0762
commit
ebe0bdae9d
2 changed files with 18 additions and 0 deletions
|
|
@ -4960,6 +4960,10 @@ already up-to-date."
|
|||
(defvar command-line-args-left) ;Avoid 'free variable' warning
|
||||
(if (not noninteractive)
|
||||
(error "`batch-byte-compile' is to be used only with -batch"))
|
||||
;; Better crash loudly than attempting to recover from undefined
|
||||
;; behavior.
|
||||
(setq attempt-stack-overflow-recovery nil
|
||||
attempt-orderly-shutdown-on-fatal-signal nil)
|
||||
(let ((error nil))
|
||||
(while command-line-args-left
|
||||
(if (file-directory-p (expand-file-name (car command-line-args-left)))
|
||||
|
|
@ -5052,6 +5056,10 @@ and corresponding effects."
|
|||
(defvar command-line-args-left) ;Avoid 'free variable' warning
|
||||
(if (not noninteractive)
|
||||
(error "batch-byte-recompile-directory is to be used only with -batch"))
|
||||
;; Better crash loudly than attempting to recover from undefined
|
||||
;; behavior.
|
||||
(setq attempt-stack-overflow-recovery nil
|
||||
attempt-orderly-shutdown-on-fatal-signal nil)
|
||||
(or command-line-args-left
|
||||
(setq command-line-args-left '(".")))
|
||||
(while command-line-args-left
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue