This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/69314] New: Use of uninitialised value in libbacktrace/pecoff.c
- From: "ranma42 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 16 Jan 2016 14:50:45 +0000
- Subject: [Bug other/69314] New: Use of uninitialised value in libbacktrace/pecoff.c
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69314
Bug ID: 69314
Summary: Use of uninitialised value in libbacktrace/pecoff.c
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: ranma42 at gmail dot com
Target Milestone: ---
In coff_add(), str_size is declared as a size_t, but if there is a symbol
table, only 4 bytes of it are initialised:
memcpy (&str_size, syms_view.data + syms_size, 4);
str_size should probably be declared as a uint32_t.
The bug at https://github.com/rust-lang/rust/issues/28447 was caused by this.
It was fixed in Rust local copy of libbacktrace:
https://github.com/rust-lang/rust/commit/55e2b7e1b4606ae0bc684293f011b7006d1f1258