heap-use-after-free in rl_do_undo

2023-04-25 Thread Grisha Levit
This segfaults in a non-ASAN build: HISTFILE= INPUTRC=<(echo '"F": history-substring-search-forward') \ bash --norc -in <<<$'.\n..\n\cP\cT\cPF\cN\cN.\cPF\c_' ERROR: AddressSanitizer: heap-use-after-free on address 0x0001060082a8 READ of size 4 at 0x0001060082a8 thread T0 #0 0x1027627b8 in

Re: jobs builtin inside SIGCHLD trap doesn't clean up terminated jobs

2023-04-25 Thread Chet Ramey
On 4/25/23 2:41 PM, Guldrelokk wrote: POSIX has the following to say with respect to the 'jobs' utility: When jobs reports the termination status of a job, the shell shall remove its process ID from the list of those known in the current shell execution environment With Bash, this is not the ca

jobs builtin inside SIGCHLD trap doesn't clean up terminated jobs

2023-04-25 Thread Guldrelokk
POSIX has the following to say with respect to the 'jobs' utility: When jobs reports the termination status of a job, the shell shall remove its process ID from the list of those known in the current shell execution environment With Bash, this is not the case for 'jobs' called from within a SIGC