python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / bash / bash44-004.patch
blobba6ff62689795f2ca30f809277b4ae7c797d23a3
1 From https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-004
3 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
5 BASH PATCH REPORT
6 =================
8 Bash-Release: 4.4
9 Patch-ID: bash44-004
11 Bug-Reported-by: Christian Weisgerber <naddy@mips.inka.de>
12 Bug-Reference-ID: <20161101160302.GB54856@lorvorc.mips.inka.de>
13 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-11/msg00004.html
15 Bug-Description:
17 There is a race condition that can result in bash referencing freed memory
18 when freeing data associated with the last process substitution.
20 Patch (apply with `patch -p0'):
22 *** a/bash-4.4/jobs.c 2016-08-23 16:38:44.000000000 -0400
23 --- b/jobs.c 2016-11-02 18:24:45.000000000 -0400
24 ***************
25 *** 454,457 ****
26 --- 454,472 ----
29 + void
30 + discard_last_procsub_child ()
31 + {
32 + PROCESS *disposer;
33 + sigset_t set, oset;
35 + BLOCK_CHILD (set, oset);
36 + disposer = last_procsub_child;
37 + last_procsub_child = (PROCESS *)NULL;
38 + UNBLOCK_CHILD (oset);
40 + if (disposer)
41 + discard_pipeline (disposer);
42 + }
44 struct pipeline_saver *
45 alloc_pipeline_saver ()
46 *** a/bash-4.4/jobs.h 2016-04-27 10:35:51.000000000 -0400
47 --- b/jobs.h 2016-11-02 18:25:08.000000000 -0400
48 ***************
49 *** 191,194 ****
50 --- 191,195 ----
51 extern void stop_making_children __P((void));
52 extern void cleanup_the_pipeline __P((void));
53 + extern void discard_last_procsub_child __P((void));
54 extern void save_pipeline __P((int));
55 extern PROCESS *restore_pipeline __P((int));
56 *** a/bash-4.4/subst.c 2016-08-30 16:46:38.000000000 -0400
57 --- b/subst.c 2016-11-02 18:23:24.000000000 -0400
58 ***************
59 *** 5809,5816 ****
60 #if defined (JOB_CONTROL)
61 if (last_procsub_child)
62 ! {
63 ! discard_pipeline (last_procsub_child);
64 ! last_procsub_child = (PROCESS *)NULL;
65 ! }
66 last_procsub_child = restore_pipeline (0);
67 #endif
68 --- 5834,5838 ----
69 #if defined (JOB_CONTROL)
70 if (last_procsub_child)
71 ! discard_last_procsub_child ();
72 last_procsub_child = restore_pipeline (0);
73 #endif
74 *** a/bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
75 --- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400
76 ***************
77 *** 26,30 ****
78 looks for to find the patch level (for the sccs version string). */
80 ! #define PATCHLEVEL 3
82 #endif /* _PATCHLEVEL_H_ */
83 --- 26,30 ----
84 looks for to find the patch level (for the sccs version string). */
86 ! #define PATCHLEVEL 4
88 #endif /* _PATCHLEVEL_H_ */