summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-04-30 14:30:44 -0700
committerGitHub <noreply@github.com>2019-04-30 14:30:44 -0700
commit5f5b187bfa17254f5ae55593820fc938c45c2b32 (patch)
treea0f4bfc3982925fa60c79b9f4ba610d82220015d /Modules
parent4d723e76e1ad17e9e7d5e828e59bb47e76f2174b (diff)
downloadcpython-git-5f5b187bfa17254f5ae55593820fc938c45c2b32.tar.gz
bpo-36734: Fix compilation of faulthandler.c on HP-UX (GH-12970)
Initialize "stack_t current_stack" to zero using memset(). (cherry picked from commit b84cb70880a0acfcbbaca7bcda405af08f94d269) Co-authored-by: Victor Stinner <vstinner@redhat.com>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/faulthandler.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index cf24c9b2b9..ec5192832c 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -1369,7 +1369,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.