0.5.13 regression: Coredump

Reilly Brogan <[email protected]> Sat, 25 Oct 2025 19:57:06 -0500
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
Hi! I have a new regression to report which doesn't seem to have been 
caught by anyone else yet. This is a coredump that happens when building 
gmp 6.3.0 with dash 0.5.13.1 (with the additional patch from Juergen 
Daubert's issue report). The coredump is as follows:
```

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=6, 
no_tid=0) at pthread_kill.c:44
#1  __pthread_kill_internal (threadid=<optimized out>, signo=6) at 
pthread_kill.c:89
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) 
at pthread_kill.c:100
#3  0x00007fa18f043b4e in __GI_raise (sig=sig@entry=6) at 
../sysdeps/posix/raise.c:26
#4  0x00007fa18f025291 in __GI_abort () at abort.c:77
#5  0x00007fa18f02631a in __libc_message_impl 
(fmt=fmt@entry=0x7fa18f1f0895 "%s\n") at ../sysdeps/posix/libc_fatal.c:138
#6  0x00007fa18f0b2ee5 in malloc_printerr (str=str@entry=0x7fa18f1f3c78 
"malloc(): invalid size (unsorted)") at malloc.c:5892
#7  0x00007fa18f0b59cc in _int_malloc (av=av@entry=0x7fa18f224ac0 
<main_arena>, bytes=bytes@entry=2017) at malloc.c:4211
#8  0x00007fa18f0b726a in _int_realloc (av=av@entry=0x7fa18f224ac0 
<main_arena>, oldp=0x563190df2340, oldsize=oldsize@entry=1024,
     nb=nb@entry=2032) at malloc.c:5093
#9  0x00007fa18f0b8a49 in __GI___libc_realloc (oldmem=<optimized out>, 
bytes=<optimized out>) at malloc.c:3672
#10 0x000056317f02fda9 in ckrealloc (p=0x1809, nbytes=6153) at memalloc.c:77
#11 0x000056317f02ffad in growstackblock (min=<optimized out>) at 
memalloc.c:227
#12 0x000056317f030078 in makestrspace (newlen=<optimized out>, p=0x1809 
<error: Cannot access memory at address 0x1809>)
     at memalloc.c:289
#13 0x000056317f034215 in readtoken1 (firstc=<optimized out>, 
syntax=<optimized out>, eofmark=0x0, striptabs=0) at parser.c:1032
#14 0x000056317f036225 in xxreadtoken () at parser.c:843
#15 0x000056317f0326ad in readtoken () at parser.c:711
#16 0x000056317f03238e in list (nlflag=1) at parser.c:181
#17 0x000056317f02fa34 in parsecmd (interact=<optimized out>) at 
/mason/build/x86_64/dash-0.5.13.1.tar.gz/src/parser.c:167
#18 cmdloop (top=1) at main.c:224
#19 0x000056317f02f57f in main (argc=<optimized out>, argv=<optimized 
out>) at main.c:181
```

This is using dash built with clang 21.1.4, and the configure script for 
gmp invoked as `/usr/bin/dash ./configure --prefix=/usr 
--bindir=/usr/bin --sbindir=/usr/sbin --build=x86_64-aerynos-linux 
--host=x86_64-aerynos-linux --libdir=/usr/lib --mandir=/usr/share/man 
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc 
--localstatedir=/var --sharedstatedir=/var/lib --libexecdir=/usr/lib/gmp 
--enable-cxx`

I attempted to bisect this however was only able to get a range of 
possible bad commits due to the gmp configure script exiting earlier 
with `configure: error: cannot run /usr/bin/dash ./config.sub`. The 
three commits it could be are the following:
```
# only skipped commits left to test
# possible first bad commit: [44b15ea09a9ee5872cf477e4ffc6b42ef37d1e46] 
input: Use tee(2) for stdin pipe
# possible first bad commit: [b1864ee9f2418f84d918ef101dab972ecf4f852f] 
input: Use lseek on stdin when possible
# possible first bad commit: [a065467315dc5f2f312f7e6f1d2e9d05a77b3cb7] 
input: Move newline loop into preadbuffer
```

Regards,
Reilly