diff options
Diffstat (limited to 'meta/recipes-devtools/gdb/gdb/0007-Fix-invalid-sigprocmask-call.patch')
-rw-r--r-- | meta/recipes-devtools/gdb/gdb/0007-Fix-invalid-sigprocmask-call.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gdb/gdb/0007-Fix-invalid-sigprocmask-call.patch b/meta/recipes-devtools/gdb/gdb/0007-Fix-invalid-sigprocmask-call.patch new file mode 100644 index 0000000000..26e3ad9098 --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/0007-Fix-invalid-sigprocmask-call.patch @@ -0,0 +1,46 @@ +From ebeb6125acf6b4e4a8a4eaa59e2830b9ca02d683 Mon Sep 17 00:00:00 2001 +From: Yousong Zhou <yszhou4tech@gmail.com> +Date: Fri, 24 Mar 2017 10:36:03 +0800 +Subject: [PATCH] Fix invalid sigprocmask call +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The POSIX document says + + The pthread_sigmask() and sigprocmask() functions shall fail if: + + [EINVAL] + The value of the how argument is not equal to one of the defined values. + +and this is how musl-libc is currently doing. Fix the call to be safe +and correct + + [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html + +gdb/ChangeLog: +2017-03-24 Yousong Zhou <yszhou4tech@gmail.com> + + * common/signals-state-save-restore.c (save_original_signals_state): + Fix invalid sigprocmask call. + +Upstream-Status: Pending [not author, cherry-picked from LEDE https://bugs.lede-project.org/index.php?do=details&task_id=637&openedfrom=-1%2Bweek] +Signed-off-by: André Draszik <adraszik@tycoint.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + gdbsupport/signals-state-save-restore.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdbsupport/signals-state-save-restore.cc b/gdbsupport/signals-state-save-restore.cc +index 3ec7a259c9c..0702eca7725 100644 +--- a/gdbsupport/signals-state-save-restore.cc ++++ b/gdbsupport/signals-state-save-restore.cc +@@ -38,7 +38,7 @@ save_original_signals_state (bool quiet) + int i; + int res; + +- res = gdb_sigmask (0, NULL, &original_signal_mask); ++ res = gdb_sigmask (SIG_BLOCK, NULL, &original_signal_mask); + if (res == -1) + perror_with_name (("sigprocmask")); + |