Re: loadable cut builtin gives assertion botched in free()

Chet Ramey <[email protected]> Mon, 16 Mar 2026 10:43:22 -0400
Newsgroups gmane.comp.shells.bash.bugs
Organization ITS, Case Western Reserve University
Message-ID <[email protected]>
On 3/16/26 1:41 AM, Duncan Roe wrote:
> Hi Chet,
> 
> Bash version: devel tip (or any other branch tip)
> Sample:-
> | 16:17:12$ echo A=BB| cut -f1 -d' ' | cut -f2 -d=
> | BB
> | 16:17:38$ enable cut
> | 16:17:46$ echo A=BB| cut -f1 -d' ' | cut -f2 -d=
> | BB
> |
> | malloc: cut.c:342: assertion botched
> | free: start and end chunk sizes differ
> | last command: echo A=BB| cut -f1 -d' ' | cut -f2 -d=
> | Aborting...Aborted                    (core dumped) echo A=BB | cut -f1 -d' ' | cut -f2 -d=
> | 16:17:49$ rm core

Thanks for the report and fix.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc (application/pgp-signature, 203 B)
-----BEGIN PGP SIGNATURE-----

wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCabgXCgUDAAAAAAAKCRC7WGnwZOp0q0ge
AJwIjJvA96i5ew+jJrwmEAWPoaczMgCfQ+J7rx/pJj7GkSlpzSWPUF0OlkU=
=fgZe
-----END PGP SIGNATURE-----