Subject: coreutils 9.7 printf crashes on Solaris 11
From: Bruno Haible <[email-masked]>
To: [email-masked]
Date: Sat, 12 Apr 2025 23:16:10 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Running the attached script on Solaris 11.4 or Solaris 11 OpenIndiana,
in the coreutils-9.7 build tree, produces a crash:

$ sh ~/cmd
42 351 ...
4 235 ...
42 351 ...
/home/bruno/cmd: line 4: 18141: Memory fault(coredump)
Segmentation Fault (core dumped)

What triggers the crash is a %'g directive that produces a large
number of digits.

The gdb stack trace shows the location: inside function
insert_thousands_sep in /lib/64/libc.so.1.