Commit b84cb708 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-36734: Fix compilation of faulthandler.c on HP-UX (GH-12970)

Initialize "stack_t current_stack" to zero using memset().
parent 3bbcc925
Fix compilation of ``faulthandler.c`` on HP-UX. Initialize ``stack_t
current_stack`` to zero using ``memset()``.
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment