Subject: bug#67129: 30.0.50; starting js-mode or js-ts-mode eats ram until emacs gets killed

From: alex <[email-masked]>
Date: Sun, 12 Nov 2023 12:24:39 +0000

Running from the current master build of emacs when entering js-mode
emacs consumes ram until it is eventually killed by the OS including
when executed with -Q

Not sure how to get a stack trace as it has the process end without
crashing.

In GNU Emacs 30.0.50 (build 1, x86_64-alpine-linux-musl, GTK+ Version
 3.24.38, cairo version 1.18.0) of 2023-11-12 built on build
System Description: Alpine Linux edge

Configured using:
 'configure --build=x86_64-alpine-linux-musl
 --host=x86_64-alpine-linux-musl --prefix=/usr --sysconfdir=/etc
 --libexecdir=/usr/lib --localstatedir=/var --with-gameuser=:games
 --with-gpm --with-harfbuzz --with-json --with-x-toolkit=gtk3
 --with-pgtk --with-xft --with-jpeg=yes --with-tiff=no
 --with-native-compilation=aot 'CFLAGS=-Os -fstack-clash-protection
 -Wformat -Werror=format-security -fno-plt -O2 -flto=auto'
 'LDFLAGS=-Wl,--as-needed,-O1,--sort-common
 -Wl,-z,pack-relative-relocs''

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP
SOUND SQLITE3 THREADS TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  minibuffer-depth-indicate-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  global-corfu-mode: t
  corfu-mode: t
  save-place-mode: t
  override-global-mode: t
  pixel-scroll-precision-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-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:
None found.

Features:
(shadow sort mail-extr 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 files-x package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-handlers auth-source-pass url-parse auth-source json map url-vars
magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff
smerge-mode diff diff-mode git-commit log-edit pcvs-util add-log
magit-core magit-autorevert autorevert filenotify magit-margin
magit-transient magit-process with-editor shell pcomplete server
magit-mode transient magit-git magit-base magit-section benchmark
format-spec cursor-sensor crm eieio eieio-core cl-macs dash emacsbug
message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec
password-cache epa derived epg rfc6068 epg-config gnus-util time-date
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils orderless compile text-property-search comint ansi-osc
ansi-color mb-depth init icomplete corfu compat edmacro kmacro byte-opt
saveplace use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core pixel-scroll cua-base ring comp comp-cstr warnings
icons gv comp-run comp-common display-line-numbers wombat-theme delsel
yasnippet-autoloads with-editor-autoloads wgrep-autoloads
urgrep-autoloads tuareg-autoloads rx subsonic-autoloads s-autoloads
protobuf-mode-autoloads popon-autoloads paredit-autoloads
orderless-autoloads ocamlformat-autoloads nov-autoloads
markdown-mode-autoloads magit-autoloads llama-autoloads kv-autoloads
htmlize-autoloads ht-autoloads hare-ts-mode-autoloads gotest-autoloads
ghub-autoloads geiser-guile-autoloads geiser-autoloads f-autoloads
esxml-autoloads epkg-autoloads emacsql-autoloads eat-autoloads
deferred-autoloads dash-autoloads dart-mode-autoloads
crystal-mode-autoloads corfu-terminal-autoloads corfu-autoloads
compat-autoloads closql-autoloads cargo-autoloads cape-autoloads
borg-autoloads cl-extra help-mode bluetooth-autoloads cl-seq borg
loaddefs-gen generate-lisp-file lisp-mnt radix-tree subr-x pcase info
cl-loaddefs cl-lib bytecomp byte-compile rmc iso-transl tooltip cconv
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd
touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar 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 inotify dynamic-setting system-font-setting
font-render-setting cairo gtk pgtk multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 279760 516390) (symbols 48 17062 272)
 (strings 32 53111 30899) (string-bytes 1 1822529) (vectors 16 33090)
 (vector-slots 8 612987 409873) (floats 8 112 894)
 (intervals 56 368 117) (buffers 992 11))