Skip to content

Commit

Permalink
Fixed bug #2019: uninitialized stack globals leads to crash
Browse files Browse the repository at this point in the history
Not being initialized, checking `XG_BASE(stack)` may not work,
especially if memory is not zeroed, this is the case with *musl libc*.

This bug has been introduced in 9437d03
  • Loading branch information
patrickallaert committed Sep 16, 2021
1 parent fd20893 commit 9840e16
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions xdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ PHP_INI_END()

static void xdebug_init_base_globals(struct xdebug_base_info *xg)
{
xg->stack = NULL;
xg->in_debug_info = 0;
xg->output_is_tty = OUTPUT_NOT_CHECKED;
xg->in_execution = 0;
Expand Down

0 comments on commit 9840e16

Please sign in to comment.