bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash-4.3 Official Patch 22


From: Chet Ramey
Subject: Bash-4.3 Official Patch 22
Date: Fri, 1 Aug 2014 16:06:08 -0400

                             BASH PATCH REPORT
                             =================

Bash-Release:   4.3
Patch-ID:       bash43-022

Bug-Reported-by:        address@hidden
Bug-Reference-ID:       <address@hidden>
Bug-Reference-URL:      
http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00061.html

Bug-Description:

Using nested pipelines within loops with the `lastpipe' option set can result
in a segmentation fault.

Patch (apply with `patch -p0'):

*** ../bash-4.3-patched/execute_cmd.c   2014-01-31 10:54:52.000000000 -0500
--- execute_cmd.c       2014-06-19 08:05:49.000000000 -0400
***************
*** 2410,2414 ****
        lstdin = wait_for (lastpid);
  #if defined (JOB_CONTROL)
!       exec_result = job_exit_status (lastpipe_jid);
  #endif
        unfreeze_jobs_list ();
--- 2425,2438 ----
        lstdin = wait_for (lastpid);
  #if defined (JOB_CONTROL)
!       /* If wait_for removes the job from the jobs table, use result of last
!        command as pipeline's exit status as usual.  The jobs list can get
!        frozen and unfrozen at inconvenient times if there are multiple 
pipelines
!        running simultaneously. */
!       if (INVALID_JOB (lastpipe_jid) == 0)
!       exec_result = job_exit_status (lastpipe_jid);
!       else if (pipefail_opt)
!       exec_result = exec_result | lstdin;     /* XXX */
!       /* otherwise we use exec_result */
!         
  #endif
        unfreeze_jobs_list ();
*** ../bash-4.3/patchlevel.h    2012-12-29 10:47:57.000000000 -0500
--- patchlevel.h        2014-03-20 20:01:28.000000000 -0400
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 21
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 22
  
  #endif /* _PATCHLEVEL_H_ */

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]