diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-01-30 16:19:08 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-01-30 16:19:08 -0500 |
| commit | 63e040391d8ae958a2fe04f2b836fecfdb782431 (patch) | |
| tree | 5780f20eff89fa8af79adbf6733203f537e57ad7 /lib/log.c | |
| parent | c882c9dd80d1d2007b96132eeb06d1151ea4d30c (diff) | |
lib: Prevent unininted usage of data
Valgrind reports that some data being used in the
stack unwind of a crash is being used uninitailized.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/log.c')
| -rw-r--r-- | lib/log.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -179,6 +179,9 @@ void zlog_backtrace_sigsafe(int priority, void *program_counter) unw_word_t ip, off, sp; Dl_info dlinfo; + memset(&uc, 0, sizeof(uc)); + memset(&cursor, 0, sizeof(cursor)); + unw_getcontext(&uc); unw_init_local(&cursor, &uc); while (unw_step(&cursor) > 0) { |
