1 | BASH PATCH REPORT |
---|
2 | ================= |
---|
3 | |
---|
4 | Bash-Release: 4.3 |
---|
5 | Patch-ID: bash43-022 |
---|
6 | |
---|
7 | Bug-Reported-by: scorp.dev.null@gmail.com |
---|
8 | Bug-Reference-ID: <E1WxXw8-0007iE-Bi@pcm14> |
---|
9 | Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00061.html |
---|
10 | |
---|
11 | Bug-Description: |
---|
12 | |
---|
13 | Using nested pipelines within loops with the `lastpipe' option set can result |
---|
14 | in a segmentation fault. |
---|
15 | |
---|
16 | Patch (apply with `patch -p0'): |
---|
17 | |
---|
18 | *** ../bash-4.3-patched/execute_cmd.c 2014-01-31 10:54:52.000000000 -0500 |
---|
19 | --- execute_cmd.c 2014-06-19 08:05:49.000000000 -0400 |
---|
20 | *************** |
---|
21 | *** 2410,2414 **** |
---|
22 | lstdin = wait_for (lastpid); |
---|
23 | #if defined (JOB_CONTROL) |
---|
24 | ! exec_result = job_exit_status (lastpipe_jid); |
---|
25 | #endif |
---|
26 | unfreeze_jobs_list (); |
---|
27 | --- 2425,2438 ---- |
---|
28 | lstdin = wait_for (lastpid); |
---|
29 | #if defined (JOB_CONTROL) |
---|
30 | ! /* If wait_for removes the job from the jobs table, use result of last |
---|
31 | ! command as pipeline's exit status as usual. The jobs list can get |
---|
32 | ! frozen and unfrozen at inconvenient times if there are multiple pipelines |
---|
33 | ! running simultaneously. */ |
---|
34 | ! if (INVALID_JOB (lastpipe_jid) == 0) |
---|
35 | ! exec_result = job_exit_status (lastpipe_jid); |
---|
36 | ! else if (pipefail_opt) |
---|
37 | ! exec_result = exec_result | lstdin; /* XXX */ |
---|
38 | ! /* otherwise we use exec_result */ |
---|
39 | ! |
---|
40 | #endif |
---|
41 | unfreeze_jobs_list (); |
---|
42 | *** ../bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 |
---|
43 | --- patchlevel.h 2014-03-20 20:01:28.000000000 -0400 |
---|
44 | *************** |
---|
45 | *** 26,30 **** |
---|
46 | looks for to find the patch level (for the sccs version string). */ |
---|
47 | |
---|
48 | ! #define PATCHLEVEL 21 |
---|
49 | |
---|
50 | #endif /* _PATCHLEVEL_H_ */ |
---|
51 | --- 26,30 ---- |
---|
52 | looks for to find the patch level (for the sccs version string). */ |
---|
53 | |
---|
54 | ! #define PATCHLEVEL 22 |
---|
55 | |
---|
56 | #endif /* _PATCHLEVEL_H_ */ |
---|