Subject: bug#55832: 28.1; Emacs crashes when using tramp from helm in emacs-29

From: Eli Zaretskii <[email-masked]>
Date: Wed, 08 Jun 2022 19:30:12 +0300

> From: Thierry Volpiatto <[email-masked]>
> Cc: [email-masked]
> Date: Tue, 07 Jun 2022 19:20:39 +0000
> 
> Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
> 0x0000555555837be7 in doprnt (buffer=0x7fffff6702c0 "", bufsize=4000, format=0x5555558af29a "Bytecode stack overflow", ap=0x7fffff670250, format_end=<optimized out>) at doprnt.c:186
> 186     doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
> (gdb) thread 1
> [Switching to thread 1 (Thread 0x7ffff07ce3c0 (LWP 226687))]
> #0  0x0000555555837be7 in doprnt (buffer=0x7fffff6702c0 "", bufsize=4000, format=0x5555558af29a "Bytecode stack overflow", ap=0x7fffff670250, format_end=<optimized out>) at doprnt.c:186
> 186     doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
> (gdb) bt -full 5
> #0  0x0000555555837be7 in doprnt (buffer=0x7fffff6702c0 "", bufsize=4000, format=0x5555558af29a "Bytecode stack overflow", ap=0x7fffff670250, format_end=<optimized out>) at doprnt.c:186
>         fmt = <optimized out>
>         bufptr = <optimized out>
>         tembuf = '\000' <repeats 407 times>
>         size_allocated = <optimized out>
>         sprintf_buffer = <optimized out>
>         big_buffer = <optimized out>
>         quoting_style = <optimized out>
> #1  0x0000555555838a57 in doprnt (ap=0x7fffff670250, format_end=0x0, format=0x5555558af29a "Bytecode stack overflow", bufsize=<optimized out>, buffer=<optimized out>) at doprnt.c:590
>         modifier_len = "\000\001\001\001\001"
>         nbytes = <optimized out>
>         ap_copy = {{gp_offset = 8, fp_offset = 48, overflow_arg_area = 0x7fffff671380, reg_save_area = 0x7fffff6712c0}}
> #2  evxprintf
>     (buf=buf@entry=0x7fffff6702b8, bufsize=bufsize@entry=0x7fffff6702b0, nonheapbuf=nonheapbuf@entry=0x7fffff6702c0 "", bufsize_max=bufsize_max@entry=2305843009213693952, format=0x5555558af29a "Bytecode stack overflow", ap=ap@entry=0x7fffff6712a0) at doprnt.c:590
>         nbytes = <optimized out>
>         ap_copy = {{gp_offset = 8, fp_offset = 48, overflow_arg_area = 0x7fffff671380, reg_save_area = 0x7fffff6712c0}}

Sounds like C stack overflow trying to print a too-long variable-arg
list?  Why else would a program segfault when calling a function?