:PROPERTIES: :ID: 544E65F2-9EED-4D0E-812F-79205DA0040F :END: #+title: Debugging Ideas * Eager macro expansion failure, abort, ... macroexp native-compiled, rest source. Dumnping. #+begin_src sh Loading /Users/gerd/emacs/savannah/igc/lisp/indent.el (source)... Loading /Users/gerd/emacs/savannah/igc/lisp/emacs-lisp/cl-generic.el (source)... Loading /Users/gerd/emacs/savannah/igc/lisp/simple.el (source)... Error: error ("Eager macro-expansion failure: (setting-constant byte-compile-form-stack)") signal(error ("Eager macro-expansion failure: (setting-constant byte-compile-form-stack)")) error("Eager macro-expansion failure: %S" (setting-constant byte-compile-form-stack)) internal-macroexpand-for-load((defalias 'undo #'(lambda (&optional arg) "Undo some previous changes.\nRepeat this command to undo more changes.\nA numeric ARG serves as a repeat count.\n\nIn Transient Mark mode when the mark is active, undo changes only within\nthe current region. Similarly, when not in Transient Mark mode, just \\[universal-argument]\nas an argument limits undo to changes within the current region." (interactive "*P") (let* ((modified (buffer-modified-p)) (base-buffer (or (buffer-base-buffer) (current-buffer))) (recent-save (with-current-buffer base-buffer (recent-auto-save-p))) (inhibit-region (and (symbolp last-command) (get last-command 'undo-inhibit-region))) message) (setq this-command 'undo-start) (unless (and (eq last-command 'undo) (or (eq pending-undo-list t) (undo--last-change-was-undo-p buffer-undo-list))) (setq undo-in-region (and (or (region-active-p) (and arg (not (numberp arg)))) (not inhibit-region))) (if undo-in-region (undo-start (region-beginning) (region-end)) (undo-start)) (undo-more 1)) (setq this-command 'undo) (let ((equiv (gethash pending-undo-list undo-equiv-table))) (or (eq (selected-window) (minibuffer-window)) (setq message (format "%s%s" (if (or undo-no-redo (not equiv)) "Undo" "Redo") (if undo-in-region " in region" "")))) (when (and (consp equiv) undo-no-redo) (while (let ((next (gethash equiv undo-equiv-table))) (if next (setq equiv next)))) (setq pending-undo-list (if (consp equiv) equiv t)))) (undo-more (if (numberp arg) (prefix-numeric-value arg) 1)) (let ((list buffer-undo-list)) (while (eq (car list) nil) (setq list (cdr list))) (puthash list (cond (undo-in-region 'undo-in-region) ((eq list pending-undo-list) (or (gethash list undo-equiv-table) 'empty)) (t pending-undo-list)) undo-equiv-table)) (let ((tail buffer-undo-list) (prev nil)) (while (car tail) (when (integerp (car tail)) (let ((pos (car tail))) (if prev (setcdr prev (cdr tail)) (setq buffer-undo-list (cdr tail))) (setq tail (cdr tail)) (while (car tail) (if (eq pos (car tail)) (if prev (setcdr prev (cdr tail)) (setq buffer-undo-list (cdr tail))) (setq prev tail)) (setq tail (cdr tail))) (setq tail nil))) (setq prev tail tail (cdr tail)))) (and modified (not (buffer-modified-p)) (with-current-buffer base-buffer (delete-auto-save-file-if-necessary recent-save))) (if message (message "%s" message))))) t) eval-buffer(# nil "/Users/gerd/emacs/savannah/igc/lisp/simple.el" nil t) (if eval-function (funcall eval-function buffer (if dump-mode file fullname)) (eval-buffer buffer nil (if dump-mode file fullname) nil t)) (let ((read-symbol-shorthands shorthands)) (if eval-function (funcall eval-function buffer (if dump-mode file fullname)) (eval-buffer buffer nil (if dump-mode file fullname) nil t))) (let ((load-true-file-name fullname) (load-file-name fullname) (set-auto-coding-for-load t) (inhibit-file-name-operation nil) shorthands) (with-current-buffer buffer (set-buffer-multibyte t) (let (deactivate-mark) (insert-file-contents fullname)) (setq shorthands (and hack-read-symbol-shorthands-function (funcall hack-read-symbol-shorthands-function))) (if (and enable-multibyte-characters (or (eq (coding-system-type last-coding-system-used) 'raw-text))) (set-buffer-multibyte nil)) (set-buffer-modified-p nil)) (let ((read-symbol-shorthands shorthands)) (if eval-function (funcall eval-function buffer (if dump-mode file fullname)) (eval-buffer buffer nil (if dump-mode file fullname) nil t)))) (unwind-protect (let ((load-true-file-name fullname) (load-file-name fullname) (set-auto-coding-for-load t) (inhibit-file-name-operation nil) shorthands) (with-current-buffer buffer (set-buffer-multibyte t) (let (deactivate-mark) (insert-file-contents fullname)) (setq shorthands (and hack-read-symbol-shorthands-function (funcall hack-read-symbol-shorthands-function))) (if (and enable-multibyte-characters (or (eq (coding-system-type last-coding-system-used) 'raw-text))) (set-buffer-multibyte nil)) (set-buffer-modified-p nil)) (let ((read-symbol-shorthands shorthands)) (if eval-function (funcall eval-function buffer (if dump-mode file fullname)) (eval-buffer buffer nil (if dump-mode file fullname) nil t)))) (let (kill-buffer-hook kill-buffer-query-functions) (kill-buffer buffer))) (let ((buffer (generate-new-buffer " *load*")) (load-in-progress t) (source (string-suffix-p ".el" fullname))) (unless nomessage (if source (message "Loading %s (source)..." file) (message "Loading %s..." file))) (when purify-flag (push (purecopy file) preloaded-file-list)) (unwind-protect (let ((load-true-file-name fullname) (load-file-name fullname) (set-auto-coding-for-load t) (inhibit-file-name-operation nil) shorthands) (with-current-buffer buffer (set-buffer-multibyte t) (let (deactivate-mark) (insert-file-contents fullname)) (setq shorthands (and hack-read-symbol-shorthands-function (funcall hack-read-symbol-shorthands-function))) (if (and enable-multibyte-characters (or (eq (coding-system-type last-coding-system-used) 'raw-text))) (set-buffer-multibyte nil)) (set-buffer-modified-p nil)) (let ((read-symbol-shorthands shorthands)) (if eval-function (funcall eval-function buffer (if dump-mode file fullname)) (eval-buffer buffer nil (if dump-mode file fullname) nil t)))) (let (kill-buffer-hook kill-buffer-query-functions) (kill-buffer buffer))) (do-after-load-evaluation fullname) (unless (or nomessage noninteractive) (if source (message "Loading %s (source)...done" file) (message "Loading %s...done" file))) t) (if (null (file-readable-p fullname)) (and (null noerror) (signal 'file-error (list "Cannot open load file" file))) (let ((buffer (generate-new-buffer " *load*")) (load-in-progress t) (source (string-suffix-p ".el" fullname))) (unless nomessage (if source (message "Loading %s (source)..." file) (message "Loading %s..." file))) (when purify-flag (push (purecopy file) preloaded-file-list)) (unwind-protect (let ((load-true-file-name fullname) (load-file-name fullname) (set-auto-coding-for-load t) (inhibit-file-name-operation nil) shorthands) (with-current-buffer buffer (set-buffer-multibyte t) (let (deactivate-mark) (insert-file-contents fullname)) (setq shorthands (and hack-read-symbol-shorthands-function (funcall hack-read-symbol-shorthands-function))) (if (and enable-multibyte-characters (or (eq (coding-system-type last-coding-system-used) 'raw-text))) (set-buffer-multibyte nil)) (set-buffer-modified-p nil)) (let ((read-symbol-shorthands shorthands)) (if eval-function (funcall eval-function buffer (if dump-mode file fullname)) (eval-buffer buffer nil (if dump-mode file fullname) nil t)))) (let (kill-buffer-hook kill-buffer-query-functions) (kill-buffer buffer))) (do-after-load-evaluation fullname) (unless (or nomessage noninteractive) (if source (message "Loading %s (source)...done" file) (message "Loading %s...done" file))) t)) load-with-code-conversion("/Users/gerd/emacs/savannah/igc/lisp/simple.el" "/Users/gerd/emacs/savannah/igc/lisp/simple.el" nil nil) load("simple") load("loadup.el") Eager macro-expansion failure: (setting-constant byte-compile-form-stack) #+end_src C-h v #+begin_src sh byte-compile-form-stack is a variable defined in ‘macroexp.el’. #+end_src At least suspicious that it is in macroexp which is native cpmpiled. * Abort in set_internal #+begin_src sh (lldb) p *sym (Lisp_Symbol) { u = { s = { gcmarkbit = false redirect = SYMBOL_PLAINVAL trapped_write = SYMBOL_NOWRITE | SYMBOL_TRAPPED_WRITE interned = SYMBOL_INTERNED | SYMBOL_INTERNED_IN_INITIAL_OBARRAY declared_special = true pinned = true name = 0x000000010f0f1614 (struct Lisp_String *) $4 = 0x000000010f0f1610 val = { value = 0x0000000110623fe3 (struct Lisp_Cons *) $5 = 0x0000000110623fe0 alias = 0x0000000110623fe3 blv = 0x0000000110623fe3 fwd = (fwdptr = 0x0000000110623fe3) } function = NULL plist = 0x000000010f0f163b (struct Lisp_Cons *) $6 = 0x000000010f0f1638 next = 0x000000010f0f1650 } gcaligned = '\xf8' } } (lldb) p *$4 error: Couldn't apply expression side effects : Couldn't dematerialize a result variable: couldn't read its memory (lldb) p *(struct igc_header *) client_to_base (sym) (struct igc_header) (obj_type = IGC_OBJ_FWD, pvec_type = PVEC_FREE, hash = 1074169, nwords = 7) #+end_src Same procedure as last year, Miss Sophie. Symbol points to tombstone. #+begin_src sh (lldb) p *(struct igc_header *) 0x000000010f8619f8 (struct igc_header) (obj_type = IGC_OBJ_SYMBOL, pvec_type = PVEC_FREE, hash = 1074169, nwords = 7) (lldb) p *(struct Lisp_Symbol *) base_to_client ((void *)0x000000010f8619f8) (struct Lisp_Symbol) { u = { s = { gcmarkbit = false redirect = SYMBOL_PLAINVAL trapped_write = SYMBOL_UNTRAPPED_WRITE interned = SYMBOL_INTERNED_IN_INITIAL_OBARRAY declared_special = true pinned = false name = 0x000000010f0f1614 (struct Lisp_String *) $9 = 0x000000010f0f1610 val = { value = 0x000000010f864efb (struct Lisp_Cons *) $10 = 0x000000010f864ef8 alias = 0x000000010f864efb blv = 0x000000010f864efb fwd = (fwdptr = 0x000000010f864efb) } function = NULL plist = 0x000000010f0f163b (struct Lisp_Cons *) $11 = 0x000000010f0f1638 next = 0x000000010f0f1650 } gcaligned = '\xc0' } } (lldb) p *$9 error: Couldn't apply expression side effects : Couldn't dematerialize a result variable: couldn't read its memory (lldb) p *(struct igc_header *) client_to_base ($9) error: Couldn't apply expression side effects : Couldn't dematerialize a result variable: couldn't read its memory (lldb) memory read 0x000000010f0f1610 error: memory read failed for 0x10f0f1600 (lldb) xpostmortem (lldb) memory read 0x000000010f0f1610 0x10f0f1610: 17 00 00 00 00 00 00 00 17 00 00 00 00 00 00 00 ................ 0x10f0f1620: 00 00 00 00 00 00 00 00 08 b0 0e 0f 01 00 00 00 ................ (lldb) p *(struct Lisp_String *)0x000000010f0f1610 (struct Lisp_String) { u = { s = { size = 23 size_byte = 23 intervals = NULL data = 0x000000010f0eb008 "byte-compile-form-stack" } next = 0x0000000000000017 gcaligned = '\x17' } } #+end_src