Bug 30366 - [Objdump] Use of uninitialised value at debug.c
Summary: [Objdump] Use of uninitialised value at debug.c
Status: RESOLVED DUPLICATE of bug 30365
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-17 17:48 UTC by Ziqiao Kong
Modified: 2023-04-18 00:49 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Both the full logs and object file (1.12 KB, application/x-xz)
2023-04-17 17:48 UTC, Ziqiao Kong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ziqiao Kong 2023-04-17 17:48:32 UTC
Created attachment 14834 [details]
Both the full logs and 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:

```
==535411== Memcheck, a memory error detector
==535411== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==535411== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==535411== Command: /binutils/binutils/objdump -g objdump-eval3-msan/msanchild91/crashes/id:000000,sig:09,src:024180,time:62208140,execs:
8755175,op:havoc,rep:4,+san
==535411==
==535411== Conditional jump or move depends on uninitialised value(s)
==535411==    at 0x19936F: debug_class_type_samep (debug.c:3273)
==535411==    by 0x19936F: debug_type_samep (debug.c:3090)
==535411==    by 0x19988E: debug_set_class_id (debug.c:2973)
==535411==    by 0x19A165: debug_write_type (debug.c:2508)
==535411==    by 0x199C09: debug_write_type (debug.c:2539)
==535411==    by 0x199FC7: debug_write_type (debug.c:2562)
==535411==    by 0x19A57E: debug_write_name (debug.c:2378)
==535411==    by 0x19C9A8: debug_write (debug.c:2350)
==535411==    by 0x19802D: print_debugging_info (prdbg.c:296)
==535411==    by 0x16A6F9: dump_bfd (objdump.c:5693)
==535411==    by 0x16B43C: display_object_bfd (objdump.c:5744)
==535411==    by 0x16B43C: display_any_bfd (objdump.c:5831)
==535411==    by 0x16B4F2: display_file (objdump.c:5852)
==535411==    by 0x16B4F2: display_file (objdump.c:5835)
==535411==    by 0x165C17: main (objdump.c:6263)
==535411==
==535411== Conditional jump or move depends on uninitialised value(s)
==535411==    at 0x19768B: pr_struct_field (prdbg.c:1118)
==535411==    by 0x19768B: pr_struct_field (prdbg.c:1105)
==535411==    by 0x199C2B: debug_write_type (debug.c:2541)
==535411==    by 0x199C09: debug_write_type (debug.c:2539)
==535411==    by 0x199FC7: debug_write_type (debug.c:2562)
==535411==    by 0x19A57E: debug_write_name (debug.c:2378)
==535411==    by 0x19C9A8: debug_write (debug.c:2350)
==535411==    by 0x19802D: print_debugging_info (prdbg.c:296)
==535411==    by 0x16A6F9: dump_bfd (objdump.c:5693)
==535411==    by 0x16B43C: display_object_bfd (objdump.c:5744)
==535411==    by 0x16B43C: display_any_bfd (objdump.c:5831)
==535411==    by 0x16B4F2: display_file (objdump.c:5852)
==535411==    by 0x16B4F2: display_file (objdump.c:5835)
==535411==    by 0x165C17: main (objdump.c:6263)
==535411==
<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 #
```
Comment 1 Alan Modra 2023-04-18 00:49:51 UTC
Dup

*** This bug has been marked as a duplicate of bug 30365 ***