1 |
commit: 7b16ed130f2ab2a38562726023fda23d40634038 |
2 |
Author: Neula <thomas <AT> famsim <DOT> de> |
3 |
AuthorDate: Sun Oct 28 13:45:08 2018 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 29 11:42:31 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=7b16ed13 |
7 |
|
8 |
net-fs/autofs: fix segfault when using automount with --debug flag |
9 |
|
10 |
net-fs/autofs/autofs-5.1.4.ebuild | 3 +- |
11 |
.../files/autofs-early-pthread_key_create.patch | 42 ++++++++++++++++++++++ |
12 |
2 files changed, 44 insertions(+), 1 deletion(-) |
13 |
|
14 |
diff --git a/net-fs/autofs/autofs-5.1.4.ebuild b/net-fs/autofs/autofs-5.1.4.ebuild |
15 |
index 3546185..71bf379 100644 |
16 |
--- a/net-fs/autofs/autofs-5.1.4.ebuild |
17 |
+++ b/net-fs/autofs/autofs-5.1.4.ebuild |
18 |
@@ -1,4 +1,4 @@ |
19 |
-# Copyright 1999-2018 Gentoo Foundation |
20 |
+# Copyright 1999-2018 Gentoo Authors |
21 |
# Distributed under the terms of the GNU General Public License v2 |
22 |
|
23 |
EAPI=6 |
24 |
@@ -47,6 +47,7 @@ CONFIG_CHECK="~AUTOFS4_FS" |
25 |
|
26 |
PATCHES=( |
27 |
"${FILESDIR}"/${PN}-musl.patch |
28 |
+ "${FILESDIR}"/${PN}-early-pthread_key_create.patch |
29 |
) |
30 |
|
31 |
src_prepare() { |
32 |
|
33 |
diff --git a/net-fs/autofs/files/autofs-early-pthread_key_create.patch b/net-fs/autofs/files/autofs-early-pthread_key_create.patch |
34 |
new file mode 100644 |
35 |
index 0000000..6e59812 |
36 |
--- /dev/null |
37 |
+++ b/net-fs/autofs/files/autofs-early-pthread_key_create.patch |
38 |
@@ -0,0 +1,42 @@ |
39 |
+Fixes segfault when launching autofs with debugging info |
40 |
+ |
41 |
+--- autofs-5.1.4/daemon/automount.c 2017-12-19 03:46:44.000000000 +0100 |
42 |
++++ autofs-5.1.4/daemon/automount.c 2018-10-28 12:45:28.388254819 +0100 |
43 |
+@@ -2495,16 +2495,10 @@ int main(int argc, char *argv[]) |
44 |
+ macro_free_global_table(); |
45 |
+ exit(1); |
46 |
+ } |
47 |
+- |
48 |
+- info(logging, "Starting automounter version %s, master map %s", |
49 |
+- version, master_list->name); |
50 |
+- info(logging, "using kernel protocol version %d.%02d", |
51 |
+- get_kver_major(), get_kver_minor()); |
52 |
+- |
53 |
+- status = pthread_key_create(&key_thread_stdenv_vars, |
54 |
+- key_thread_stdenv_vars_destroy); |
55 |
++ |
56 |
++ status = pthread_key_create(&key_thread_attempt_id, free); |
57 |
+ if (status) { |
58 |
+- logerr("%s: failed to create thread data key for std env vars!", |
59 |
++ logerr("%s: failed to create thread data key for attempt ID!", |
60 |
+ program); |
61 |
+ master_kill(master_list); |
62 |
+ res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat)); |
63 |
+@@ -2513,10 +2507,15 @@ int main(int argc, char *argv[]) |
64 |
+ macro_free_global_table(); |
65 |
+ exit(1); |
66 |
+ } |
67 |
++ info(logging, "Starting automounter version %s, master map %s", |
68 |
++ version, master_list->name); |
69 |
++ info(logging, "using kernel protocol version %d.%02d", |
70 |
++ get_kver_major(), get_kver_minor()); |
71 |
+ |
72 |
+- status = pthread_key_create(&key_thread_attempt_id, free); |
73 |
++ status = pthread_key_create(&key_thread_stdenv_vars, |
74 |
++ key_thread_stdenv_vars_destroy); |
75 |
+ if (status) { |
76 |
+- logerr("%s: failed to create thread data key for attempt ID!", |
77 |
++ logerr("%s: failed to create thread data key for std env vars!", |
78 |
+ program); |
79 |
+ master_kill(master_list); |
80 |
+ res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat)); |