bpo-36734: Fix compilation of faulthandler.c on HP-UX (GH-12970) · python/cpython@b84cb70

2 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,2 @@

1+

Fix compilation of ``faulthandler.c`` on HP-UX. Initialize ``stack_t

2+

current_stack`` to zero using ``memset()``.

Original file line numberDiff line numberDiff line change

@@ -1370,7 +1370,8 @@ void _PyFaulthandler_Fini(void)

13701370

#ifdef HAVE_SIGALTSTACK

13711371

if (stack.ss_sp != NULL) {

13721372

/* Fetch the current alt stack */

1373-

stack_t current_stack = {};

1373+

stack_t current_stack;

1374+

memset(&current_stack, 0, sizeof(current_stack));

13741375

if (sigaltstack(NULL, &current_stack) == 0) {

13751376

if (current_stack.ss_sp == stack.ss_sp) {

13761377

/* The current alt stack is the one that we installed.