Skip to content

Commit b84cb70

Browse files
authored
bpo-36734: Fix compilation of faulthandler.c on HP-UX (GH-12970)
Initialize "stack_t current_stack" to zero using memset().
1 parent 3bbcc92 commit b84cb70

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
Lines changed: 2 additions & 0 deletions
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()``.

Modules/faulthandler.c

Lines changed: 2 additions & 1 deletion
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.

0 commit comments

Comments
 (0)