On 8/11/14, 2:21 PM, lolilolicon wrote:
> Sorry for the unhelpful title, but I can't find a one that isn't
> longer than the body of the mail.
>
> The following code segfaults when run by bash 4.3.022
>
> set -E
> shopt -s lastpipe
> trap -- 'true' ERR
> true | { true | false; }
>
> This is probably related to the bug patched by bash43-022.
Here's a patch for those who would like to test.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/
*** ../bash-4.3-patched/execute_cmd.c 2014-07-30 10:26:52.000000000 -0400
--- execute_cmd.c 2014-08-11 16:55:57.000000000 -0400
***************
*** 2406,2410 ****
{
#if defined (JOB_CONTROL)
! append_process (savestring (the_printed_command), dollar_dollar_pid, exec_result, lastpipe_jid);
#endif
lstdin = wait_for (lastpid);
--- 2433,2438 ----
{
#if defined (JOB_CONTROL)
! if (INVALID_JOB (lastpipe_jid) == 0)
! append_process (savestring (the_printed_command_except_trap), dollar_dollar_pid, exec_result, lastpipe_jid);
#endif
lstdin = wait_for (lastpid);