[Bug 295086] /bin/sh undefined variable in heredoc triggers assertion
Date: Fri, 08 May 2026 15:43:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295086
Jilles Tjoelker <jilles@FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|New |Open
--- Comment #1 from Jilles Tjoelker <jilles@FreeBSD.org> ---
This seems like a valid bug, thanks for the report.
Experimenting with crashing and working commands refines the issue a little:
* Other expansion errors such as ${some_unset_variable?} or $((1/0)) also
result in a crash.
* The command substitution must contain a single simple command for a crash to
occur.
* The non-POSIX $(cat << eol) with the heredoc body outside the parentheses is
not relevant: the issue also happens with things like
thing=$(cat <<eol
$((1/0))
eol
)
--
You are receiving this mail because:
You are the assignee for the bug.