Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 838736 - app-shells/bash-5.2_beta: crash with eselect compiler-shadow update (dev-util/shadowman)
Summary: app-shells/bash-5.2_beta: crash with eselect compiler-shadow update (dev-util...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-16 06:31 UTC by Sam James
Modified: 2022-04-16 06:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-16 06:31:35 UTC
Just filing for recordkeeping and for visibility.

'eselect compiler-shadow update' seems to silently crash bash-5.2_beta (interestingly, return code is 0).

Only noticed at first when I saw dmesg & coredumpctl spam with bash crashes.

After discussion in #gentoo-base, ionen came up with a far better & actually useful reproducer:
# bash -c "compgen -c -X a"
Segmentation fault (core dumped)

Reported upstream at: https://lists.gnu.org/archive/html/bug-bash/2022-04/msg00042.html
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-16 06:34:13 UTC
Oh, and for completeness:

Backtrace:
```
Starting program: /bin/bash -c compgen\ -c\ -X\ a
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
__strchr_avx2 () at ../sysdeps/x86_64/multiarch/strchr-avx2.S:65
65              vmovdqu (%rdi), %ymm8
(gdb) bt
#0  __strchr_avx2 () at ../sysdeps/x86_64/multiarch/strchr-avx2.S:65
#1  0x00005555555c618f in quote_word_break_chars (text=0x55555565f300 
"/usr/local/sbin/.keep") at bashline.c:4143
#2  bash_quote_filename (s=s@entry=0x55555565f2c0 "/usr/local/sbin/.keep", 
rtype=rtype@entry=1, qcp=qcp@entry=0x7fffffffdbbf "") at bashline.c:4346
#3  0x00005555555c73f5 in executable_completion (searching_path=1, 
filename=0x55555565f2c0 "/usr/local/sbin/.keep") at bashline.c:1951
#4  command_word_completion_function (hint_text=0x555555613bff "", state=83) at 
bashline.c:2378
#5  0x00007ffff7f77257 in rl_completion_matches (text=text@entry=0x555555613bff 
"", entry_function=0x5555555c6d70 <command_word_completion_function>)
    at 
/usr/src/debug/sys-libs/readline-8.2_beta/readline-8.2-beta/complete.c:2219
#6  0x00005555555d00ef in gen_action_completions 
(text=text@entry=0x555555613bff "", cs=<optimized out>, cs=<optimized out>) at 
pcomplete.c:856
#7  0x00005555555d02f1 in gen_compspec_completions (cs=cs@entry=0x555555655860, 
cmd=cmd@entry=0x5555556130b0 "compgen", word=word@entry=0x555555613bff "", 
start=start@entry=0,
    end=end@entry=0, foundp=foundp@entry=0x0) at pcomplete.c:1333
#8  0x00005555555ebab1 in compgen_builtin (list=<optimized out>) at 
./complete.def:721
#9  0x0000555555579f7b in execute_builtin (builtin=builtin@entry=0x5555555eb7f0 
<compgen_builtin>, words=words@entry=0x555555655510, flags=flags@entry=64, 
subshell=subshell@entry=0)
    at execute_cmd.c:4958
#10 0x000055555557fec1 in execute_builtin_or_function (flags=64, 
fds_to_close=0x5555556551a0, redirects=0x0, var=0x0, builtin=0x5555555eb7f0 
<compgen_builtin>, words=0x555555655510)
    at execute_cmd.c:5472
#11 execute_simple_command (fds_to_close=0x5555556551a0, async=<optimized out>, 
pipe_out=<optimized out>, pipe_in=<optimized out>, 
simple_command=0x555555655080) at execute_cmd.c:4724
#12 execute_command_internal (command=0x555555655050, 
asynchronous=asynchronous@entry=0, pipe_in=pipe_in@entry=-1, 
pipe_out=pipe_out@entry=-1, fds_to_close=fds_to_close@entry=0x5555556551a0)
    at execute_cmd.c:866
#13 0x00005555555d8c99 in parse_and_execute (string=<optimized out>, 
from_file=from_file@entry=0x5555555fd09f "-c", flags=flags@entry=20) at 
evalstring.c:519
#14 0x0000555555565650 in run_one_command (command=0x7fffffffe4fe "compgen -c 
-X a") at shell.c:1473
#15 0x0000555555563f0d in main (argc=3, argv=0x7fffffffe268, 
env=0x7fffffffe288) at shell.c:763
```