summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-11-03 18:30:23 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-07 10:56:26 +0000
commit7bfe8b2f8c5565a057ff903433fce87c569314ca (patch)
tree1485472000363adc4bda920f296621097e446e18 /meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch
parenteec7affb53e406c72c20d10fc14d730ade1761b0 (diff)
downloadpoky-7bfe8b2f8c5565a057ff903433fce87c569314ca.tar.gz
gdb: Upgrade to 11.1
Drop backported patches Changes are here [1] [1] https://sourceware.org/pipermail/gdb-announce/2021/000129.html (From OE-Core rev: e1c421c0450212201ad9737bf203eac2bfcd37db) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch')
-rw-r--r--meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch b/meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch
new file mode 100644
index 0000000000..5b9d1cfaf9
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch
@@ -0,0 +1,49 @@
1From 5740876d92ddb67b039d5fbcd1b71e6c58823c08 Mon Sep 17 00:00:00 2001
2From: Yousong Zhou <yszhou4tech@gmail.com>
3Date: Fri, 24 Mar 2017 10:36:03 +0800
4Subject: [PATCH 09/10] Fix invalid sigprocmask call
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9The POSIX document says
10
11 The pthread_sigmask() and sigprocmask() functions shall fail if:
12
13 [EINVAL]
14 The value of the how argument is not equal to one of the defined values.
15
16and this is how musl-libc is currently doing. Fix the call to be safe
17and correct
18
19 [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html
20
21gdb/ChangeLog:
222017-03-24 Yousong Zhou <yszhou4tech@gmail.com>
23
24 * common/signals-state-save-restore.c (save_original_signals_state):
25 Fix invalid sigprocmask call.
26
27Upstream-Status: Pending [not author, cherry-picked from LEDE https://bugs.lede-project.org/index.php?do=details&task_id=637&openedfrom=-1%2Bweek]
28Signed-off-by: André Draszik <adraszik@tycoint.com>
29Signed-off-by: Khem Raj <raj.khem@gmail.com>
30---
31 gdbsupport/signals-state-save-restore.cc | 2 +-
32 1 file changed, 1 insertion(+), 1 deletion(-)
33
34diff --git a/gdbsupport/signals-state-save-restore.cc b/gdbsupport/signals-state-save-restore.cc
35index 95c156e5036..f4aa512d105 100644
36--- a/gdbsupport/signals-state-save-restore.cc
37+++ b/gdbsupport/signals-state-save-restore.cc
38@@ -38,7 +38,7 @@ save_original_signals_state (bool quiet)
39 int i;
40 int res;
41
42- res = gdb_sigmask (0, NULL, &original_signal_mask);
43+ res = gdb_sigmask (SIG_BLOCK, NULL, &original_signal_mask);
44 if (res == -1)
45 perror_with_name (("sigprocmask"));
46
47--
482.33.1
49