Subject: Re: bug#79020: 31.0.50; Crash when saving file with before-save-hook

From: Gerd Möllmann <[email-masked]>
Date: Tue, 15 Jul 2025 04:45:46 +0200

Gerd Möllmann <[email-masked]> writes:

> I have configured Emacs to reformat Gleam source files before saving
> them, using a before-save-hook:
>
>   (use-package gleam-ts-mode :straight t :defer t
>     :config
>     (add-to-list 'eglot-server-programs '(gleam-ts-mode "gleam" "lsp"))
>     :mode
>     (rx ".gleam" eos)
>     :hook
>     (gleam-ts-mode . eglot-ensure)
>     (gleam-ts-mode . (lambda () (add-hook 'before-save-hook 'gleam-ts-format nil t)))
>     :bind
>     (:map gleam-ts-mode-map
>           ("C-c e" . my-eglot-bindings)
>           ("s-e" . my-eglot-bindings)))
>
> This crashes Emacs when I modify a source file, and gleam-ts-format runs
> and actually changes (reformats) the buffer. When I remove the
> before-save-hook, Emacs does not crash.
>
> Bisect says:
>
> 61a8ce0280668980a4452b112103c9bc879e1f49 is the first bad commit
> commit 61a8ce0280668980a4452b112103c9bc879e1f49
> Author: Paul Eggert <[email-masked]>
> Date:   Sat Jul 12 17:03:29 2025 -0700
>     Fix insert-file-contents overlap calculation
>     
>     * src/fileio.c (Finsert_file_contents): Overlap is impossible, so
>     omit incorrect overflow adjustments that caused later index
>     calculations to go off the rails (Bug#77315).  Change a ‘ZV_BYTE’
>     to ‘same_at_end’ for clarity; they have the same value here.
>  src/fileio.c | 14 +-------------
>  1 file changed, 1 insertion(+), 13 deletions(-)
>
>
> In GNU Emacs 31.0.50 (build 6, aarch64-apple-darwin24.5.0) of 2025-07-14
>  built on pro2
> Repository revision: b2d5e4fe40b56913c9282b3e584336fed47474d2
> Repository branch: master
> System Description:  macOS 15.5
>
> Configured using:
>  'configure --without-ns --without-x --cache-file
>  /var/folders/1d/k_6t25f94sl83szqbf8gpkrh0000gn/T//config.cache.master
>  --with-native-compilation=no CC=clang 'CFLAGS=-Wgnu-imaginary-constant
>  -Wunused-result -g -Wno-ignored-attributes -Wno-flag-enum
>  -Wno-missing-method-return-type -Wno-variadic-macros
>  -Wno-strict-prototypes -Wno-availability -Wno-nullability-completeness'
>  --prefix=/Users/gerd/.local'
>
> Configured features:
> ACL DBUS GMP GNUTLS LCMS2 LIBXML2 MODULES NOTIFY KQUEUE PDUMPER SQLITE3
> THREADS TREE_SITTER XIM ZLIB
>
> Important settings:
>   value of $LANG: en_US.UTF-8
>   locale-coding-system: utf-8-unix
>
> Major mode: Gleam
>
> Minor modes in effect:
>   global-git-commit-mode: t
>   magit-auto-revert-mode: t
>   global-jinx-mode: t
>   jinx-mode: t
>   xterm-mouse-mode: t
>   consult-org-roam-mode: t
>   org-roam-db-autosync-mode: t
>   tty-tip-mode: t
>   drag-stuff-global-mode: t
>   drag-stuff-mode: t
>   minions-mode: t
>   savehist-mode: t
>   easysession-save-mode: t
>   apprentice-hooks-mode: t
>   eglot-inactive-regions-mode: t
>   xclip-mode: t
>   global-devil-mode: t
>   devil-mode: t
>   global-auto-revert-mode: t
>   recentf-mode: t
>   repeat-mode: t
>   windmove-mode: t
>   transient-posframe-mode: t
>   which-key-posframe-mode: t
>   which-key-mode: t
>   persistent-scratch-autosave-mode: t
>   delete-selection-mode: t
>   global-hl-line-mode: t
>   eglot--managed-mode: t
>   flymake-mode: t
>   mouse-wheel-mode: t
>   global-corfu-mode: t
>   corfu-mode: t
>   vertico-posframe-mode: t
>   vertico-multiform-mode: t
>   vertico-mouse-mode: t
>   vertico-mode: t
>   override-global-mode: t
>   global-kkp-mode: t
>   straight-use-package-mode: t
>   straight-package-neutering-mode: t
>   tooltip-mode: t
>   global-eldoc-mode: t
>   eldoc-mode: t
>   show-paren-mode: t
>   electric-indent-mode: t
>   tab-bar-history-mode: t
>   tab-bar-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   context-menu-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   minibuffer-regexp-mode: t
>   indent-tabs-mode: t
>   transient-mark-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>
> Load-path shadows:
> /Users/gerd/.config/emacs.d.default/straight/build/which-key/which-key hides /Users/gerd/emacs/github/master/lisp/which-key
> /Users/gerd/.config/emacs.d.default/straight/build/transient/transient hides /Users/gerd/emacs/github/master/lisp/transient
> /Users/gerd/.config/emacs.d.default/straight/build/ef-themes/theme-loaddefs hides /Users/gerd/emacs/github/master/lisp/theme-loaddefs
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-comint hides /Users/gerd/emacs/github/master/lisp/org/ob-comint
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-exp hides /Users/gerd/emacs/github/master/lisp/org/ob-exp
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-ctags hides /Users/gerd/emacs/github/master/lisp/org/org-ctags
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-emacs-lisp hides /Users/gerd/emacs/github/master/lisp/org/ob-emacs-lisp
> /Users/gerd/.config/emacs.d.default/straight/build/org/oc hides /Users/gerd/emacs/github/master/lisp/org/oc
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox-texinfo hides /Users/gerd/emacs/github/master/lisp/org/ox-texinfo
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-irc hides /Users/gerd/emacs/github/master/lisp/org/ol-irc
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-doi hides /Users/gerd/emacs/github/master/lisp/org/ol-doi
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob hides /Users/gerd/emacs/github/master/lisp/org/ob
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-refile hides /Users/gerd/emacs/github/master/lisp/org/org-refile
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-version hides /Users/gerd/emacs/github/master/lisp/org/org-version
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-num hides /Users/gerd/emacs/github/master/lisp/org/org-num
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-mhe hides /Users/gerd/emacs/github/master/lisp/org/ol-mhe
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-shell hides /Users/gerd/emacs/github/master/lisp/org/ob-shell
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-attach hides /Users/gerd/emacs/github/master/lisp/org/org-attach
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-C hides /Users/gerd/emacs/github/master/lisp/org/ob-C
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-macs hides /Users/gerd/emacs/github/master/lisp/org/org-macs
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-entities hides /Users/gerd/emacs/github/master/lisp/org/org-entities
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-dot hides /Users/gerd/emacs/github/master/lisp/org/ob-dot
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-sql hides /Users/gerd/emacs/github/master/lisp/org/ob-sql
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-eww hides /Users/gerd/emacs/github/master/lisp/org/ol-eww
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-datetree hides /Users/gerd/emacs/github/master/lisp/org/org-datetree
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-macro hides /Users/gerd/emacs/github/master/lisp/org/org-macro
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-eval hides /Users/gerd/emacs/github/master/lisp/org/ob-eval
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-haskell hides /Users/gerd/emacs/github/master/lisp/org/ob-haskell
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox-org hides /Users/gerd/emacs/github/master/lisp/org/ox-org
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-rmail hides /Users/gerd/emacs/github/master/lisp/org/ol-rmail
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-awk hides /Users/gerd/emacs/github/master/lisp/org/ob-awk
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-groovy hides /Users/gerd/emacs/github/master/lisp/org/ob-groovy
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox-icalendar hides /Users/gerd/emacs/github/master/lisp/org/ox-icalendar
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-octave hides /Users/gerd/emacs/github/master/lisp/org/ob-octave
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-scheme hides /Users/gerd/emacs/github/master/lisp/org/ob-scheme
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-mobile hides /Users/gerd/emacs/github/master/lisp/org/org-mobile
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-processing hides /Users/gerd/emacs/github/master/lisp/org/ob-processing
> /Users/gerd/.config/emacs.d.default/straight/build/org/oc-biblatex hides /Users/gerd/emacs/github/master/lisp/org/oc-biblatex
> /Users/gerd/.config/emacs.d.default/straight/build/org/oc-csl hides /Users/gerd/emacs/github/master/lisp/org/oc-csl
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-colview hides /Users/gerd/emacs/github/master/lisp/org/org-colview
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-R hides /Users/gerd/emacs/github/master/lisp/org/ob-R
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-table hides /Users/gerd/emacs/github/master/lisp/org/org-table
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox-html hides /Users/gerd/emacs/github/master/lisp/org/ox-html
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-fortran hides /Users/gerd/emacs/github/master/lisp/org/ob-fortran
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol hides /Users/gerd/emacs/github/master/lisp/org/ol
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-plantuml hides /Users/gerd/emacs/github/master/lisp/org/ob-plantuml
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-docview hides /Users/gerd/emacs/github/master/lisp/org/ol-docview
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-perl hides /Users/gerd/emacs/github/master/lisp/org/ob-perl
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-sqlite hides /Users/gerd/emacs/github/master/lisp/org/ob-sqlite
> /Users/gerd/.config/emacs.d.default/straight/build/org/oc-basic hides /Users/gerd/emacs/github/master/lisp/org/oc-basic
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-sed hides /Users/gerd/emacs/github/master/lisp/org/ob-sed
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-fold-core hides /Users/gerd/emacs/github/master/lisp/org/org-fold-core
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-ditaa hides /Users/gerd/emacs/github/master/lisp/org/ob-ditaa
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-ruby hides /Users/gerd/emacs/github/master/lisp/org/ob-ruby
> /Users/gerd/.config/emacs.d.default/straight/build/org/oc-bibtex hides /Users/gerd/emacs/github/master/lisp/org/oc-bibtex
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-habit hides /Users/gerd/emacs/github/master/lisp/org/org-habit
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-loaddefs hides /Users/gerd/emacs/github/master/lisp/org/org-loaddefs
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-gnus hides /Users/gerd/emacs/github/master/lisp/org/ol-gnus
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-screen hides /Users/gerd/emacs/github/master/lisp/org/ob-screen
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-mouse hides /Users/gerd/emacs/github/master/lisp/org/org-mouse
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-css hides /Users/gerd/emacs/github/master/lisp/org/ob-css
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-inlinetask hides /Users/gerd/emacs/github/master/lisp/org/org-inlinetask
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-lisp hides /Users/gerd/emacs/github/master/lisp/org/ob-lisp
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-eshell hides /Users/gerd/emacs/github/master/lisp/org/ol-eshell
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-pcomplete hides /Users/gerd/emacs/github/master/lisp/org/org-pcomplete
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-lint hides /Users/gerd/emacs/github/master/lisp/org/org-lint
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-id hides /Users/gerd/emacs/github/master/lisp/org/org-id
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-capture hides /Users/gerd/emacs/github/master/lisp/org/org-capture
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-sass hides /Users/gerd/emacs/github/master/lisp/org/ob-sass
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-tangle hides /Users/gerd/emacs/github/master/lisp/org/ob-tangle
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-calc hides /Users/gerd/emacs/github/master/lisp/org/ob-calc
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-java hides /Users/gerd/emacs/github/master/lisp/org/ob-java
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-compat hides /Users/gerd/emacs/github/master/lisp/org/org-compat
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-attach-git hides /Users/gerd/emacs/github/master/lisp/org/org-attach-git
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox-beamer hides /Users/gerd/emacs/github/master/lisp/org/ox-beamer
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-protocol hides /Users/gerd/emacs/github/master/lisp/org/org-protocol
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-element hides /Users/gerd/emacs/github/master/lisp/org/org-element
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-lob hides /Users/gerd/emacs/github/master/lisp/org/ob-lob
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-tempo hides /Users/gerd/emacs/github/master/lisp/org/org-tempo
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-python hides /Users/gerd/emacs/github/master/lisp/org/ob-python
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-latex hides /Users/gerd/emacs/github/master/lisp/org/ob-latex
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-w3m hides /Users/gerd/emacs/github/master/lisp/org/ol-w3m
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-agenda hides /Users/gerd/emacs/github/master/lisp/org/org-agenda
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-persist hides /Users/gerd/emacs/github/master/lisp/org/org-persist
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-ocaml hides /Users/gerd/emacs/github/master/lisp/org/ob-ocaml
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-ref hides /Users/gerd/emacs/github/master/lisp/org/ob-ref
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-fold hides /Users/gerd/emacs/github/master/lisp/org/org-fold
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-julia hides /Users/gerd/emacs/github/master/lisp/org/ob-julia
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-lilypond hides /Users/gerd/emacs/github/master/lisp/org/ob-lilypond
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-table hides /Users/gerd/emacs/github/master/lisp/org/ob-table
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-clojure hides /Users/gerd/emacs/github/master/lisp/org/ob-clojure
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-indent hides /Users/gerd/emacs/github/master/lisp/org/org-indent
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-plot hides /Users/gerd/emacs/github/master/lisp/org/org-plot
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox-latex hides /Users/gerd/emacs/github/master/lisp/org/ox-latex
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-src hides /Users/gerd/emacs/github/master/lisp/org/org-src
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-duration hides /Users/gerd/emacs/github/master/lisp/org/org-duration
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-makefile hides /Users/gerd/emacs/github/master/lisp/org/ob-makefile
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-info hides /Users/gerd/emacs/github/master/lisp/org/ol-info
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-clock hides /Users/gerd/emacs/github/master/lisp/org/org-clock
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-forth hides /Users/gerd/emacs/github/master/lisp/org/ob-forth
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox-odt hides /Users/gerd/emacs/github/master/lisp/org/ox-odt
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-man hides /Users/gerd/emacs/github/master/lisp/org/ol-man
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox-publish hides /Users/gerd/emacs/github/master/lisp/org/ox-publish
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-archive hides /Users/gerd/emacs/github/master/lisp/org/org-archive
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-org hides /Users/gerd/emacs/github/master/lisp/org/ob-org
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-lua hides /Users/gerd/emacs/github/master/lisp/org/ob-lua
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-keys hides /Users/gerd/emacs/github/master/lisp/org/org-keys
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-eshell hides /Users/gerd/emacs/github/master/lisp/org/ob-eshell
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-faces hides /Users/gerd/emacs/github/master/lisp/org/org-faces
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox-man hides /Users/gerd/emacs/github/master/lisp/org/ox-man
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-list hides /Users/gerd/emacs/github/master/lisp/org/org-list
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox-md hides /Users/gerd/emacs/github/master/lisp/org/ox-md
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-goto hides /Users/gerd/emacs/github/master/lisp/org/org-goto
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-bbdb hides /Users/gerd/emacs/github/master/lisp/org/ol-bbdb
> /Users/gerd/.config/emacs.d.default/straight/build/org/org hides /Users/gerd/emacs/github/master/lisp/org/org
> /Users/gerd/.config/emacs.d.default/straight/build/org/ol-bibtex hides /Users/gerd/emacs/github/master/lisp/org/ol-bibtex
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox-koma-letter hides /Users/gerd/emacs/github/master/lisp/org/ox-koma-letter
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox-ascii hides /Users/gerd/emacs/github/master/lisp/org/ox-ascii
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-matlab hides /Users/gerd/emacs/github/master/lisp/org/ob-matlab
> /Users/gerd/.config/emacs.d.default/straight/build/org/ox hides /Users/gerd/emacs/github/master/lisp/org/ox
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-timer hides /Users/gerd/emacs/github/master/lisp/org/org-timer
> /Users/gerd/.config/emacs.d.default/straight/build/org/oc-natbib hides /Users/gerd/emacs/github/master/lisp/org/oc-natbib
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-core hides /Users/gerd/emacs/github/master/lisp/org/ob-core
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-feed hides /Users/gerd/emacs/github/master/lisp/org/org-feed
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-gnuplot hides /Users/gerd/emacs/github/master/lisp/org/ob-gnuplot
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-js hides /Users/gerd/emacs/github/master/lisp/org/ob-js
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-element-ast hides /Users/gerd/emacs/github/master/lisp/org/org-element-ast
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-footnote hides /Users/gerd/emacs/github/master/lisp/org/org-footnote
> /Users/gerd/.config/emacs.d.default/straight/build/org/ob-maxima hides /Users/gerd/emacs/github/master/lisp/org/ob-maxima
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-cycle hides /Users/gerd/emacs/github/master/lisp/org/org-cycle
> /Users/gerd/.config/emacs.d.default/straight/build/org/org-crypt hides /Users/gerd/emacs/github/master/lisp/org/org-crypt
> /Users/gerd/.config/emacs.d.default/straight/build/soap-client/soap-client hides /Users/gerd/emacs/github/master/lisp/net/soap-client
> /Users/gerd/.config/emacs.d.default/straight/build/soap-client/soap-inspect hides /Users/gerd/emacs/github/master/lisp/net/soap-inspect
> /Users/gerd/.config/emacs.d.default/straight/build/compat/compat hides /Users/gerd/emacs/github/master/lisp/emacs-lisp/compat
> /Users/gerd/.config/emacs.d.default/straight/build/seq/seq hides /Users/gerd/emacs/github/master/lisp/emacs-lisp/seq
>
> Features:
> (shadow sort mail-extr emacsbug lisp-mnt vertico-sort tramp-cache
> time-stamp tramp-sh tramp trampver tramp-integration tramp-message
> tramp-compat parse-time iso8601 tramp-loaddefs time face-remap
> magit-bookmark magit-submodule magit-blame magit-stash magit-reflog
> magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
> magit-commit magit-sequence magit-notes magit-worktree magit-tag
> magit-merge magit-branch magit-reset magit-files magit-refs magit-status
> magit package url-handlers magit-repos magit-apply magit-wip magit-log
> magit-diff smerge-mode image git-commit log-edit message sendmail
> yank-media puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config
> gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
> rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
> mailheader pcvs-util add-log magit-core magit-autorevert magit-margin
> magit-transient magit-process with-editor server magit-mode browse-url
> url url-proxy url-privacy url-expand url-methods url-history url-cookie
> generate-lisp-file url-domsuf mailcap magit-git magit-base jka-compr
> dired-aux vc-git files-x gleam-ts-mode jinx xt-mouse emacs-lock
> meson-mode-autoloads consult-org-roam consult-org-roam-buffer
> org-roam-dailies emacsql-sqlite-builtin org-roam-migrate org-roam-log
> org-roam-mode org-roam-capture org-roam-id org-roam-node crm org-roam-db
> org-roam-utils org-roam-compat org-roam org-element org-persist xdg
> avl-tree generator org-attach org-id emacsql-sqlite emacsql
> emacsql-compiler magit-section cursor-sensor llama dash elisp-benchmarks
> org-menu org-timer org-clock dbus xml org-capture org-refile org ob
> ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src sh-script
> treesit executable ob-comint org-element-ast inline org-pcomplete
> org-list org-footnote org-faces org-entities time-date ob-emacs-lisp
> ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys
> oc org-loaddefs cal-menu calendar cal-loaddefs org-version org-compat
> org-macs noutline outline benchmark elisp-benchmarks-autoloads
> my-theme-theme tty-tip drag-stuff drag-stuff-autoloads
> markdown-mode-autoloads dtrace-script-mode cc-mode cc-fonts cc-guess
> cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
> dtrace-script-mode-autoloads minions minions-autoloads jinx-autoloads
> savehist easysession frameset easysession-autoloads
> gleam-ts-mode-autoloads apprentice apprentice-macroexpand
> apprentice-compile apprentice-phoenix apprentice-iex apprentice-scope
> which-func apprentice-hooks apprentice-hex apprentice-mix
> apprentice-eval apprentice-interact apprentice-utils apprentice-execute
> apprentice-report apprentice-test-mode apprentice-project elixir-mode
> elixir-format elixir-smie smie apprentice-autoloads
> elixir-mode-autoloads eglot-cthier toggletree eglot-supplements
> eglot-supplements-autoloads eglot-inactive-regions color
> eglot-inactive-regions-autoloads xref-union xref-union-autoloads xclip
> xclip-autoloads devil devil-autoloads consult-xref-history
> google-translate-autoloads popup-autoloads inf-lisp shell autorevert
> recentf dired dnd dired-loaddefs pcomplete disp-table ef-symbiosis-theme
> repeat cus-start cus-load rx ef-themes ef-themes-autoloads windmove
> transient-posframe transient-posframe-autoloads ielm
> consult-org-roam-autoloads goto-last-change-autoloads piem-autoloads
> org-roam-autoloads emacsql-autoloads org-menu-autoloads vterm-autoloads
> proced-narrow-autoloads use-package-ensure proced pixel-scroll cua-base
> bug-reference debbugs-autoloads soap-client-autoloads
> yasnippet-autoloads finder-inf which-key-posframe
> which-key-posframe-autoloads which-key-autoloads which-key
> persistent-scratch persistent-scratch-autoloads delsel hl-line gud
> consult-eglot eglot tree-widget wid-edit external-completion jsonrpc
> xref flymake mwheel thingatpt seq-25 diff diff-mode track-changes ert
> ewoc debug backtrace find-func filenotify warnings compile comint
> regexp-opt ansi-osc ansi-color ring url-util url-parse auth-source icons
> password-cache json map url-vars imenu consult-eglot-autoloads
> corfu-quick corfu corfu-autoloads use-package-diminish
> embark-consult-autoloads embark-autoloads consult-ls-git vc
> vc-dispatcher consult bookmark fringe text-property-search
> consult-ls-git-autoloads consult-autoloads orderless orderless-autoloads
> vertico-posframe posframe vertico-posframe-autoloads posframe-autoloads
> vertico-multiform vertico-mouse vertico-grid vertico vertico-autoloads
> marginalia marginalia-autoloads magit-todos-autoloads pcre2el-autoloads
> hl-todo-autoloads f-autoloads s-autoloads dash-autoloads async-autoloads
> magit-autoloads with-editor-autoloads magit-section-autoloads
> llama-autoloads use-package-bind-key bind-key easy-mmode project
> diminish diminish-autoloads kkp term/xterm xterm kkp-autoloads transient
> pp pcase format-spec edmacro kmacro eieio byte-opt eieio-core compat
> transient-autoloads compat-autoloads info seq-autoloads
> exec-path-from-shell-autoloads use-package-core straight-autoloads
> cl-seq cl-extra help-mode tool-bar straight subr-x cl-macs cl-loaddefs
> cl-lib bytecomp byte-compile chemacs gv rmc iso-transl tooltip cconv
> eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
> elisp-mode tabulated-list replace newcomment text-mode lisp-mode
> prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
> timer select mouse jit-lock font-lock syntax font-core term/tty-colors
> frame minibuffer nadvice seq simple cl-generic indonesian philippine
> cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
> korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
> european ethiopic indian cyrillic chinese composite emoji-zwj charscript
> charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
> cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
> files window text-properties overlay sha1 md5 base64 format env
> code-pages mule custom widget keymap hashtable-print-readable backquote
> threads dbusbind kqueue lcms2 multi-tty make-network-process
> tty-child-frames emacs)
>
> Memory information:
> ((conses 16 448510 89667) (symbols 48 37397 45)
>  (strings 32 122235 4803) (string-bytes 1 3916703) (vectors 16 67832)
>  (vector-slots 8 971075 83980) (floats 8 478 125)
>  (intervals 56 3764 267) (buffers 1064 28))

Backtraces:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x15a5fffe0)
    frame #0: 0x000000019165c468 libsystem_platform.dylib`_platform_memmove + 536
libsystem_platform.dylib`_platform_memmove:
->  0x19165c468 <+536>: stnp   q0, q1, [x3, #-0x20]
    0x19165c46c <+540>: sub    x3, x3, #0x20
    0x19165c470 <+544>: ldp    q0, q1, [x1, #-0x20]
    0x19165c474 <+548>: sub    x1, x1, #0x20
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x15a5fffe0)
  frame #0: 0x000000019165c468 libsystem_platform.dylib`_platform_memmove + 536
    frame #1: 0x0000000104754aec emacs`copy_text(from_addr="io.println(\"Hello from vars!\")\n}\n", to_addr="", nbytes=-2, from_multibyte=<unavailable>, to_multibyte=<unavailable>) at insdel.c:629:7 [opt]
    frame #2: 0x00000001047560c4 emacs`insert_from_buffer [inlined] insert_from_buffer_1(buf=0x000000015be7b588, from=273, nchars=-2, inherit=<unavailable>) at insdel.c:1303:4 [opt]
    frame #3: 0x0000000104755ee0 emacs`insert_from_buffer(buf=0x000000015be7b588, charpos=273, nchars=-2, inherit=false) at insdel.c:1223:3 [opt]
    frame #4: 0x0000000104766514 emacs`Finsert_file_contents(filename=(struct Lisp_String *) $9 = 0x000000012ad3da80, visit=(struct Lisp_Symbol *) $11 = 0x00000001048d74a0, beg=(struct Lisp_Symbol *) $14 = 0x00000001048d7470, end=(struct Lisp_Symbol *) $14 = 0x00000001048d7470, replace=<unavailable>) at fileio.c:4794:7 [opt]
    frame #5: 0x00000001047b4448 emacs`funcall_subr(subr=0x0000000104883ab8, numargs=5, args=<unavailable>) at eval.c:3231:15 [opt]
    frame #6: 0x00000001047fc070 emacs`exec_byte_code(fun=<unavailable>, args_template=<unavailable>, nargs=<unavailable>, args=<unavailable>) at bytecode.c:809:14 [opt]
    frame #7: 0x00000001047b468c emacs`funcall_lambda(fun=<unavailable>, nargs=<unavailable>, arg_vector=<unavailable>) at eval.c:3314:9 [opt] [artificial]
    frame #8: 0x00000001047b4208 emacs`funcall_general(fun=<unavailable>, numargs=<unavailable>, args=<unavailable>) at eval.c:3106:12 [opt] [artificial]
    frame #9: 0x00000001047aed6c emacs`Ffuncall(nargs=1, args=(struct Lisp_Symbol *) $17 = 0x00000002700611b8) at eval.c:3155:21 [opt]
    frame #10: 0x00000001047b3638 emacs`Frun_hook_with_args [inlined] funcall_nil(nargs=<unavailable>, args=<unavailable>) at eval.c:2838:3 [opt]
    frame #11: 0x00000001047b362c emacs`Frun_hook_with_args [inlined] run_hook_with_args(nargs=1, args=(struct Lisp_Symbol *) $17 = 0x00000002700611b8, funcall=<unavailable>) at eval.c:0 [opt]
    frame #12: 0x00000001047b3628 emacs`Frun_hook_with_args(nargs=1, args=(struct Lisp_Symbol *) $17 = 0x00000002700611b8) at eval.c:2880:10 [opt]
    frame #13: 0x00000001047b353c emacs`Frun_hooks [inlined] run_hook(hook=(struct Lisp_Symbol *) $21 = 0x000000015bbb0b20) at eval.c:3028:3 [opt]
    frame #14: 0x00000001047b3530 emacs`Frun_hooks(nargs=<unavailable>, args=<unavailable>) at eval.c:2862:5 [opt]
    frame #15: 0x00000001047b42b8 emacs`funcall_subr(subr=0x0000000104888588, numargs=1, args=<unavailable>) at eval.c:0 [opt]
    frame #16: 0x00000001047fc070 emacs`exec_byte_code(fun=<unavailable>, args_template=<unavailable>, nargs=<unavailable>, args=<unavailable>) at bytecode.c:809:14 [opt]
    frame #17: 0x00000001047b468c emacs`funcall_lambda(fun=<unavailable>, nargs=<unavailable>, arg_vector=<unavailable>) at eval.c:3314:9 [opt] [artificial]
    frame #18: 0x00000001047b4208 emacs`funcall_general(fun=<unavailable>, numargs=<unavailable>, args=<unavailable>) at eval.c:3106:12 [opt] [artificial]
    frame #19: 0x00000001047aed6c emacs`Ffuncall(nargs=2, args=(struct Lisp_Symbol *) $24 = 0x00000002700614d8) at eval.c:3155:21 [opt]
    frame #20: 0x00000001047ab650 emacs`Ffuncall_interactively(nargs=<unavailable>, args=<unavailable>) at callint.c:250:32 [opt]
    frame #21: 0x00000001047b42b8 emacs`funcall_subr(subr=0x0000000104887c58, numargs=2, args=<unavailable>) at eval.c:0 [opt]
    frame #22: 0x00000001047b4230 emacs`funcall_general(fun=<unavailable>, numargs=<unavailable>, args=<unavailable>) at eval.c:3102:12 [opt] [artificial]
    frame #23: 0x00000001047aed6c emacs`Ffuncall(nargs=3, args=(struct Lisp_Symbol *) $28 = 0x00000002700614d0) at eval.c:3155:21 [opt]
!gud 3155:21:/Users/gerd/emacs/github/master/src/eval.c
    frame #24: 0x00000001047ac8c4 emacs`Fcall_interactively(function=<unavailable>, record_flag=(struct Lisp_Symbol *) $14 = 0x00000001048d7470, keys=(struct Lisp_Vector *) $32 = 0x0000000105de0a98) at callint.c:789:21 [opt]
    frame #25: 0x00000001047b440c emacs`funcall_subr(subr=0x0000000104887c20, numargs=3, args=<unavailable>) at eval.c:3227:15 [opt]
    frame #26: 0x00000001047fc070 emacs`exec_byte_code(fun=<unavailable>, args_template=<unavailable>, nargs=<unavailable>, args=<unavailable>) at bytecode.c:809:14 [opt]
    frame #27: 0x00000001047b468c emacs`funcall_lambda(fun=<unavailable>, nargs=<unavailable>, arg_vector=<unavailable>) at eval.c:3314:9 [opt] [artificial]
    frame #28: 0x00000001047b4208 emacs`funcall_general(fun=<unavailable>, numargs=<unavailable>, args=<unavailable>) at eval.c:3106:12 [opt] [artificial]
    frame #29: 0x00000001047aed6c emacs`Ffuncall(nargs=2, args=(struct Lisp_Symbol *) $35 = 0x0000000270061980) at eval.c:3155:21 [opt]
    frame #30: 0x00000001047269b8 emacs`command_loop_1 at keyboard.c:1545:13 [opt]
    frame #31: 0x00000001047b1790 emacs`internal_condition_case(bfun=(emacs`command_loop_1 at keyboard.c:1319), handlers=<unavailable>, hfun=(emacs`cmd_error at keyboard.c:965)) at eval.c:1688:25 [opt]
    frame #32: 0x0000000104726490 emacs`command_loop_2(handlers=(struct Lisp_Symbol *) $39 = 0x00000001048d7500) at keyboard.c:1163:11 [opt]
    frame #33: 0x00000001047b0f1c emacs`internal_catch(tag=(struct Lisp_Symbol *) $42 = 0x00000001048e7790, func=(emacs`command_loop_2 at keyboard.c:1159), arg=(struct Lisp_Symbol *) $39 = 0x00000001048d7500) at eval.c:1368:25 [opt]
    frame #34: 0x0000000104725c1c emacs`command_loop at keyboard.c:1141:2 [opt]
    frame #35: 0x0000000104725a48 emacs`recursive_edit_1 at keyboard.c:749:9 [opt]
    frame #36: 0x0000000104725e54 emacs`Frecursive_edit at keyboard.c:832:3 [opt]
    frame #37: 0x0000000104724be4 emacs`main(argc=<unavailable>, argv=<unavailable>) at emacs.c:2582:3 [opt]
  frame #38: 0x0000000191282b98 dyld`start + 6076
(lldb) xbacktrace 
warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.

(unsigned char *) data = 0x0000000105e72a5b "insert-file-contents"
(unsigned char *) data = 0x0000000105e6d1f4 "revert-buffer-insert-file-contents--default-function"
(unsigned char *) data = 0x0000000105e6d41e "revert-buffer--default"
(unsigned char *) data = 0x0000000105e6d572 "revert-buffer"
(unsigned char *) data = 0x000000015bb77588 "gleam-ts-format"
(unsigned char *) data = 0x0000000105e43e9e "run-hooks"
(unsigned char *) data = 0x0000000105ec0b9e "basic-save-buffer"
(unsigned char *) data = 0x0000000105ec0c0c "save-buffer"
(unsigned char *) data = 0x0000000105ed9f6f "funcall-interactively"
(unsigned char *) data = 0x0000000105e84090 "call-interactively"
(unsigned char *) data = 0x0000000105f3024b "command-execute"
(lldb)