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>
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index cf24c9b..ec51928 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -1369,7 +1369,8 @@
#ifdef HAVE_SIGALTSTACK
if (stack.ss_sp != NULL) {
/* Fetch the current alt stack */
- stack_t current_stack = {};
+ stack_t current_stack;
+ memset(¤t_stack, 0, sizeof(current_stack));
if (sigaltstack(NULL, ¤t_stack) == 0) {
if (current_stack.ss_sp == stack.ss_sp) {
/* The current alt stack is the one that we installed.