summaryrefslogtreecommitdiffstats
path: root/Modules/faulthandler.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-30 10:19:34 (GMT)
committerGitHub <noreply@github.com>2019-04-30 10:19:34 (GMT)
commitb84cb70880a0acfcbbaca7bcda405af08f94d269 (patch)
tree2910123a81a6245417ac3413dd3ef00896652ce2 /Modules/faulthandler.c
parent3bbcc92577f8e616bc94c679040043bacd00ebf1 (diff)
downloadcpython-b84cb70880a0acfcbbaca7bcda405af08f94d269.zip
cpython-b84cb70880a0acfcbbaca7bcda405af08f94d269.tar.gz
cpython-b84cb70880a0acfcbbaca7bcda405af08f94d269.tar.bz2
bpo-36734: Fix compilation of faulthandler.c on HP-UX (GH-12970)
Initialize "stack_t current_stack" to zero using memset().
Diffstat (limited to 'Modules/faulthandler.c')
-rw-r--r--Modules/faulthandler.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index 30fe186..d45b866 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -1370,7 +1370,8 @@ void _PyFaulthandler_Fini(void)
#ifdef HAVE_SIGALTSTACK
if (stack.ss_sp != NULL) {
/* Fetch the current alt stack */
- stack_t current_stack = {};
+ stack_t current_stack;
+ memset(&current_stack, 0, sizeof(current_stack));
if (sigaltstack(NULL, &current_stack) == 0) {
if (current_stack.ss_sp == stack.ss_sp) {
/* The current alt stack is the one that we installed.