Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit 6ccb800

Browse files
committed
1 parent e0abfec commit 6ccb800

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pecoff.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,9 @@ coff_add (struct backtrace_state *state, int descriptor,
604604
int str_view_valid;
605605
uint32_t str_size;
606606
off_t str_off;
607-
struct backtrace_view syms_view;
607+
// NOTE: upstream doesn't have `{0}`, this is a fix for Rust issue #39468.
608+
// If syms_view is not initialized, then `free(syms_view.base)` may segfault later.
609+
struct backtrace_view syms_view = {0};
608610
off_t syms_off;
609611
size_t syms_size;
610612
int syms_view_valid;

0 commit comments

Comments
 (0)