https://sourceware.org/bugzilla/show_bug.cgi?id=30365
Bug ID: 30365 Summary: [Objdump] Use of uninitialised value at prdbg.c Product: binutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: ziqiaokong at gmail dot com Target Milestone: --- Created attachment 14833 --> https://sourceware.org/bugzilla/attachment.cgi?id=14833&action=edit Both full logs and the object file Git commit hash: 93c6e8c3c14bf81020ca7571fe752250a34f5bc9 Steps to reproduce: ``` ./configure make -j valgrind --leak-check=full --tool=memcheck ./binutils/objdump -D /path/to/obj ``` Valgrind output: ``` ==535033== Memcheck, a memory error detector ==535033== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==535033== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info ==535033== Command: /binutils/binutils/objdump -g ./objdump-eval3-msan/msanchild120/crashes/id:000000,sig:09,src:021620+014111,time:65035916,execs:9404945,op:splice,rep:8,+san ==535033== ==535033== Conditional jump or move depends on uninitialised value(s) ==535033== at 0x19768B: pr_struct_field (prdbg.c:1118) ==535033== by 0x19768B: pr_struct_field (prdbg.c:1105) ==535033== by 0x199C2B: debug_write_type (debug.c:2541) ==535033== by 0x19A57E: debug_write_name (debug.c:2378) ==535033== by 0x19C9A8: debug_write (debug.c:2350) ==535033== by 0x19802D: print_debugging_info (prdbg.c:296) ==535033== by 0x16A6F9: dump_bfd (objdump.c:5693) ==535033== by 0x16B43C: display_object_bfd (objdump.c:5744) ==535033== by 0x16B43C: display_any_bfd (objdump.c:5831) ==535033== by 0x16B4F2: display_file (objdump.c:5852) ==535033== by 0x16B4F2: display_file (objdump.c:5835) ==535033== by 0x165C17: main (objdump.c:6263) ==535033== ==535033== Use of uninitialised value of size 8 ==535033== at 0x48BB33B: _itoa_word (_itoa.c:177) ==535033== by 0x48D6B3D: __vfprintf_internal (vfprintf-internal.c:1516) ==535033== by 0x48E2A08: __vsprintf_internal (iovsprintf.c:95) ==535033== by 0x4995BE0: __sprintf_chk (sprintf_chk.c:40) ==535033== by 0x197750: sprintf (stdio2.h:38) ==535033== by 0x197750: print_vma (prdbg.c:484) ==535033== by 0x197750: pr_struct_field (prdbg.c:1120) ==535033== by 0x197750: pr_struct_field (prdbg.c:1105) ==535033== by 0x199C2B: debug_write_type (debug.c:2541) ==535033== by 0x19A57E: debug_write_name (debug.c:2378) ==535033== by 0x19C9A8: debug_write (debug.c:2350) ==535033== by 0x19802D: print_debugging_info (prdbg.c:296) ==535033== by 0x16A6F9: dump_bfd (objdump.c:5693) ==535033== by 0x16B43C: display_object_bfd (objdump.c:5744) ==535033== by 0x16B43C: display_any_bfd (objdump.c:5831) ==535033== by 0x16B4F2: display_file (objdump.c:5852) ==535033== by 0x16B4F2: display_file (objdump.c:5835) ==535033== ==535033== Conditional jump or move depends on uninitialised value(s) ==535033== at 0x48BB34C: _itoa_word (_itoa.c:177) ==535033== by 0x48D6B3D: __vfprintf_internal (vfprintf-internal.c:1516) ==535033== by 0x48E2A08: __vsprintf_internal (iovsprintf.c:95) ==535033== by 0x4995BE0: __sprintf_chk (sprintf_chk.c:40) ==535033== by 0x197750: sprintf (stdio2.h:38) ==535033== by 0x197750: print_vma (prdbg.c:484) ==535033== by 0x197750: pr_struct_field (prdbg.c:1120) ==535033== by 0x197750: pr_struct_field (prdbg.c:1105) ==535033== by 0x199C2B: debug_write_type (debug.c:2541) ==535033== by 0x19A57E: debug_write_name (debug.c:2378) ==535033== by 0x19C9A8: debug_write (debug.c:2350) ==535033== by 0x19802D: print_debugging_info (prdbg.c:296) ==535033== by 0x16A6F9: dump_bfd (objdump.c:5693) ==535033== by 0x16B43C: display_object_bfd (objdump.c:5744) ==535033== by 0x16B43C: display_any_bfd (objdump.c:5831) ==535033== by 0x16B4F2: display_file (objdump.c:5852) ==535033== by 0x16B4F2: display_file (objdump.c:5835) ==535033== ==535033== Conditional jump or move depends on uninitialised value(s) ==535033== at 0x48D7643: __vfprintf_internal (vfprintf-internal.c:1516) ==535033== by 0x48E2A08: __vsprintf_internal (iovsprintf.c:95) ==535033== by 0x4995BE0: __sprintf_chk (sprintf_chk.c:40) ==535033== by 0x197750: sprintf (stdio2.h:38) ==535033== by 0x197750: print_vma (prdbg.c:484) ==535033== by 0x197750: pr_struct_field (prdbg.c:1120) ==535033== by 0x197750: pr_struct_field (prdbg.c:1105) ==535033== by 0x199C2B: debug_write_type (debug.c:2541) ==535033== by 0x19A57E: debug_write_name (debug.c:2378) ==535033== by 0x19C9A8: debug_write (debug.c:2350) ==535033== by 0x19802D: print_debugging_info (prdbg.c:296) ==535033== by 0x16A6F9: dump_bfd (objdump.c:5693) ==535033== by 0x16B43C: display_object_bfd (objdump.c:5744) ==535033== by 0x16B43C: display_any_bfd (objdump.c:5831) ==535033== by 0x16B4F2: display_file (objdump.c:5852) ==535033== by 0x16B4F2: display_file (objdump.c:5835) ==535033== by 0x165C17: main (objdump.c:6263) ==535033== ==535033== Conditional jump or move depends on uninitialised value(s) ==535033== at 0x48D6C85: __vfprintf_internal (vfprintf-internal.c:1516) ==535033== by 0x48E2A08: __vsprintf_internal (iovsprintf.c:95) ==535033== by 0x4995BE0: __sprintf_chk (sprintf_chk.c:40) ==535033== by 0x197750: sprintf (stdio2.h:38) ==535033== by 0x197750: print_vma (prdbg.c:484) ==535033== by 0x197750: pr_struct_field (prdbg.c:1120) ==535033== by 0x197750: pr_struct_field (prdbg.c:1105) ==535033== by 0x199C2B: debug_write_type (debug.c:2541) ==535033== by 0x19A57E: debug_write_name (debug.c:2378) ==535033== by 0x19C9A8: debug_write (debug.c:2350) ==535033== by 0x19802D: print_debugging_info (prdbg.c:296) ==535033== by 0x16A6F9: dump_bfd (objdump.c:5693) ==535033== by 0x16B43C: display_object_bfd (objdump.c:5744) ==535033== by 0x16B43C: display_any_bfd (objdump.c:5831) ==535033== by 0x16B4F2: display_file (objdump.c:5852) ==535033== by 0x16B4F2: display_file (objdump.c:5835) ==535033== by 0x165C17: main (objdump.c:6263) ==535033== <See attached full logs> ``` System environment: ``` [afl++ amdsuplus3] /work/tmpfs # gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [afl++ amdsuplus3] /work/tmpfs # g++ --version g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [afl++ amdsuplus3] /work/tmpfs # cat /etc/issue Ubuntu 22.04.2 LTS \n \l [afl++ amdsuplus3] /work/tmpfs # uname -a Linux amdsuplus3.inf.ethz.ch 5.4.0-146-generic #163-Ubuntu SMP Fri Mar 17 18:26:02 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux [afl++ amdsuplus3] /work/tmpfs # ``` -- You are receiving this mail because: You are on the CC list for the bug.