[Bug other/69314] New: Use of uninitialised value in libbacktrace/pecoff.c

ranma42 at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Jan 16 14:50:00 GMT 2016


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


More information about the Gcc-bugs mailing list