Subject: bug#76004: 31.0.50; feature/igc crashed on Linux, wayland (with full gdb debug info)

From: Eval Exec <[email-masked]>
Date: Sun, 2 Feb 2025 19:04:44 +0800

It's:
❯ file /home/exec/Projects/git.savannah.gnu.org/git/emacs-build/feature_igc-6f7e916a6c80df11bf169587913fb0443f6b5490-gdb/bin/emacs-31.0.50
/home/exec/Projects/git.savannah.gnu.org/git/emacs-build/feature_igc-6f7e916a6c80df11bf169587913fb0443f6b5490-gdb/bin/emacs-31.0.50:
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked, interpreter
/nix/store/nqb2ns2d1lahnd5ncwmn6k84qfd7vx2k-glibc-2.40-36/lib/ld-linux-x86-64.so.2,
for GNU/Linux 3.10.0, with debug_info, not stripped

On Sun, Feb 2, 2025 at 7:02 PM Pip Cet <[email-masked]> wrote:
>
> "Eval Exec" <[email-masked]> writes:
>
> > (gdb) p &lispsym
> > $1 = (struct Lisp_Symbol (*)[1786]) 0xd459c0 <lispsym>
> > (gdb) p &lispsym
> > $2 = (struct Lisp_Symbol (*)[1786]) 0xd459c0 <lispsym>
> > (gdb) start
> > Temporary breakpoint 3 at 0x5b653f: file
> > /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/emacs.c, line
> > 1274.
> > Starting program:
> > /home/exec/Projects/git.savannah.gnu.org/git/emacs-build/feature_igc-6f7e916a6c80df11bf169587913fb0443f6b5490-gdb/bin/emacs-31.0.50
> > warning: File "/nix/store/6qkwbcx4q47dq4scz7rk4f3nlbr5937r-glib-2.82.1/lib/libgobject-2.0.so.0.8200.1-gdb.py"
> > auto-loading has been declined by your `auto-load safe-path' set to
> > "$debugdir:$datadir/auto-load:/nix/store/4gk773fqcsv4fh2rfkhs9bgfih86fdq8-gcc-13.3.0-lib".
> > warning: File "/nix/store/6qkwbcx4q47dq4scz7rk4f3nlbr5937r-glib-2.82.1/lib/libglib-2.0.so.0.8200.1-gdb.py"
> > auto-loading has been declined by your `auto-load safe-path' set to
> > "$debugdir:$datadir/auto-load:/nix/store/4gk773fqcsv4fh2rfkhs9bgfih86fdq8-gcc-13.3.0-lib".
> > [Thread debugging using libthread_db enabled]
> > Using host libthread_db library
> > "/nix/store/nqb2ns2d1lahnd5ncwmn6k84qfd7vx2k-glibc-2.40-36/lib/libthread_db.so.1".
> > warning: File "/nix/store/idpsjqf760ap2vr49hkdshhj8sfdc6mn-isl-0.20/lib/libisl.so.19.1.0-gdb.py"
> > auto-loading has been declined by your `auto-load safe-path' set to
> > "$debugdir:$datadir/auto-load:/nix/store/4gk773fqcsv4fh2rfkhs9bgfih86fdq8-gcc-13.3.0-lib".
> >
> > Temporary breakpoint 3, main (argc=1, argv=0x7fffffff5ad8) at
> > /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/emacs.c:1274
> > warning: Source file is more recent than executable.
> > 1274    #if SECCOMP_USABLE
> > (gdb) p &lispsym
> > $3 = (struct Lisp_Symbol (*)[1786]) 0xd459c0 <lispsym>
> > (gdb)
>
> Wow.  Can you run "file" on that emacs binary?  It sounds like you're
> not running a PIE executable, which is really strange.  But I tried
> building one here and it didn't crash immediately, so it's probably not
> that.
>
> (The usual "argument" for PIE is ASLR and security, but for Emacs, it's
> different: we sometimes need to tell quickly whether something might be
> a pointer or isn't.  The standard 0x555555550000 base address is large
> enough that many "small" integers can easily be excluded).
>
> > And output of `objdump -h
> > core.emacs.1000.54b0471b528c4cce800b660320b5a551.1553776.1738472003000000
> > ` is very long, I attached it to the email attached file:
>
> It is very long, yes.  I'll have to think about why that might be.
>
> Thanks so far!
> Pip
>