[Bug gprofng/29015] On Intel Skylake the call tree is incorrect

2022-07-12 Thread ruud.vanderpas at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29015

Ruud van der Pas  changed:

   What|Removed |Added

   Assignee|ruud.vanderpas at oracle dot com   |vladimir.mezentsev at 
oracle dot c
   ||om

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Number of bfd_count_sections changes during bfd_simple_get_relocated_section_contents

2022-07-12 Thread Tom de Vries

Hi,

with gdb we've run into this PR ( 
https://sourceware.org/bugzilla/show_bug.cgi?id=29295 ) which is due to:

- gdb expecting bfd_count_sections to remain constant, and
- bfd changing the bfd_count_sections from 6 to 7, due to the
  creation of a COMMON section during
  bfd_simple_get_relocated_section_contents

The question is: is this expected behaviour for bfd, or is this in fact 
a bfd bug that needs fixing?


Thanks,
- Tom



[Bug binutils/28588] significant performance regression in addr2line

2022-07-12 Thread joelhock at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28588

Joel Hock  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #3 from Joel Hock  ---
I re-tested, and this is fixed by 30cbd32aec3.  I'm closing this out as
resolved / fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29338] Declaration conflict for basename

2022-07-12 Thread sch...@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29338

--- Comment #2 from Andreas Schwab  ---
$ grep HAVE_DECL_BASENAME -r gprofng
gprofng/configure:#define HAVE_DECL_BASENAME $ac_have_decl

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29351] [display html] Move dynamic loading of modules to a later stage

2022-07-12 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29351

Kurt Goebel  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||kurt.goebel at oracle dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29352] [display html] Fix the message Hexadecimal number > 0xffffffff non-portable

2022-07-12 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29352

Kurt Goebel  changed:

   What|Removed |Added

 CC||kurt.goebel at oracle dot com
 Status|NEW |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29356] [display html] Execution fails if gprofng is not included in PATH

2022-07-12 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29356

Kurt Goebel  changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|NEW |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29353] [display html] Fix a lay-out issue in the html disassembly files

2022-07-12 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29353

Kurt Goebel  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||kurt.goebel at oracle dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29352] [display html] Fix the message Hexadecimal number > 0xffffffff non-portable

2022-07-12 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29352

Kurt Goebel  changed:

   What|Removed |Added

   Priority|P3  |P2

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29351] [display html] Move dynamic loading of modules to a later stage

2022-07-12 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29351

Kurt Goebel  changed:

   What|Removed |Added

   Priority|P3  |P2

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29353] [display html] Fix a lay-out issue in the html disassembly files

2022-07-12 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29353

Kurt Goebel  changed:

   What|Removed |Added

   Priority|P3  |P2

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29338] Declaration conflict for basename

2022-07-12 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29338

Vladimir Mezentsev  changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #3 from Vladimir Mezentsev  
---
Andreas,
several questions:
How do you configure your build ?
What is your host, Amd or Intel ?
How do you run make, do you use 'make -j' or 'make --jobs=' ?


Could you grep HAVE_DECL_BASENAME in your build directory.
In my build:
% grep HAVE_DECL_BASENAME gprofng/config.h
#define HAVE_DECL_BASENAME 1

Thank you,
-Vladimir

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/29361] New: Makefile:26: *** missing separator. Stop

2022-07-12 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29361

Bug ID: 29361
   Summary: Makefile:26: *** missing separator.  Stop
   Product: binutils
   Version: 2.39
Status: NEW
  Severity: minor
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: vladimir.mezentsev at oracle dot com
  Target Milestone: ---

When I clone binutils-gdb.git to ./binutils and run build in the same
directory,
the build failed:


% git clone https://sourceware.org/git/binutils-gdb.git  binutils
% ./binutils/configure
% make
.
make[2]: Entering directory './binutils'
Makefile:26: *** missing separator.  Stop.
make[2]: Leaving directory './binutils'
make[1]: *** [Makefile:4045: all-binutils] Error 2
make[1]: Leaving directory '.'
make: *** [Makefile:1004: all] Error 2

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/29361] Makefile:26: *** missing separator. Stop

2022-07-12 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29361

Vladimir Mezentsev  changed:

   What|Removed |Added

   Priority|P2  |P3

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/29362] New: Some memory leaks occur when binutils code is tested using the binutils fuzz test suite.

2022-07-12 Thread shenxiaogll at 163 dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29362

Bug ID: 29362
   Summary: Some memory leaks occur when binutils code is tested
using the binutils fuzz test suite.
   Product: binutils
   Version: 2.37
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: shenxiaogll at 163 dot com
  Target Milestone: ---

OS:Linux
Arch:X86_64
The binutils fuzz test code:
https://github.com/google/oss-fuzz/tree/master/projects/binutils

Memory leakage occurs in the following cases:
1.fuzz_addr2line
2.fuzz_dwarf
3.fuzz_objcopy
4.fuzz_objdump

1.fuzz_addr2line:
When the bfd_check_format_matches interface is used, the user needs to release
the memory, which is a test case problem rather than binutils problem.
It is verified that the input parameter matching of the
bfd_check_format_matches function of the test case is empty and released to
solve the leak problem.
+ if (matching!=NULL) {free(matching);}

Leaked Memory:
==95==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 445824 byte(s) in 108 object(s) allocated from:
#0 0x5221bd in malloc
/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
#1 0x56ad44 in bfd_malloc /src/binutils-gdb/bfd/libbfd.c:289:9
#2 0x566455 in bfd_check_format_matches
/src/binutils-gdb/bfd/format.c:258:47
#3 0x55539b in fuzz_preconditions_check
/src/binutils-gdb/binutils/./ada_addr2line.h:72:9
#4 0x5557fd in LLVMFuzzerTestOneInput
/src/binutils-gdb/binutils/fuzz_addr2line.c:65:7
#5 0x45a991 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*,
unsigned long) /src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:556:15
#6 0x45a0b5 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long,
bool, fuzzer::InputInfo*, bool*)
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:470:3
#7 0x45c457 in fuzzer::Fuzzer::MutateAndTestOne()
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:698:19
#8 0x45d1e5 in fuzzer::Fuzzer::Loop(std::Fuzzer::vector >&)
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:830:5
#9 0x44b368 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char
const*, unsigned long))
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:824:6
#10 0x4753e2 in main
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:19:10
#11 0x7f505229782f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

SUMMARY: AddressSanitizer: 445824 byte(s) leaked in 108 allocation(s).


2.fuzz_dwarf:
The leakage problem of this test case is the same as the problem
(1.fuzz_addr2line),(The matching input parameter is not released),The function
of the bfd_check_format_matches() interface used in the fuzz test case is
incomplete. This problem is not caused by the bintuils itself.

Leaked Memory:
==70==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 57792 byte(s) in 14 object(s) allocated from:
#0 0x52263d in malloc
/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
#1 0x91c1b4 in bfd_malloc /src/binutils-gdb/bfd/libbfd.c:289:9
#2 0x9178c5 in bfd_check_format_matches
/src/binutils-gdb/bfd/format.c:258:47
#3 0x5585d5 in LLVMFuzzerTestOneInput
/src/binutils-gdb/binutils/fuzz_dwarf.c:36:7
#4 0x45ae11 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*,
unsigned long) /src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:556:15
#5 0x45a535 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long,
bool, fuzzer::InputInfo*, bool*)
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:470:3
#6 0x45c8d7 in fuzzer::Fuzzer::MutateAndTestOne()
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:698:19
#7 0x45d665 in fuzzer::Fuzzer::Loop(std::Fuzzer::vector >&)
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:830:5
#8 0x44b7e8 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char
const*, unsigned long))
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:824:6
#9 0x475862 in main
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:19:10
#10 0x7fe2148de82f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

SUMMARY: AddressSanitizer: 57792 byte(s) leaked in 14 allocation(s).


3.fuzz_objcopy:
Leakage point 1: The main interface of the test case does not release the
memory. This problem occurs in the test case.

Leakage point 2: The release function clean_symbol_htabs() needs to be added to
invoke the open-source public memory release function htab_delete. Release the
created lists one by one.

Leakage point 3:
1>. After leak point 2 is rectified, a new leak point exists. The possible
patch
https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=d6e1d48c83b165c129cb0aa78905f7ca80a1f682,
however, is incomplete.
2>. This community patch only fixes the leak under the failed branch of the
make_tempd

[Bug gas/29363] New: Some memory leaks occur when binutils code is tested using the binutils fuzz test suite.

2022-07-12 Thread shenxiaogll at 163 dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29363

Bug ID: 29363
   Summary: Some memory leaks occur when binutils code is tested
using the binutils fuzz test suite.
   Product: binutils
   Version: 2.37
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: shenxiaogll at 163 dot com
  Target Milestone: ---

OS:Linux
Arch:X86_64
The binutils fuzz test code:
https://github.com/google/oss-fuzz/tree/master/projects/binutils

Memory leakage occurs in the following cases:
fuzz_as

fuzz_as:
In the as.c logic implementation of the source code of the /usr/bin/as tool,
the *_begin() and *_init() initialization functions are invoked to allocate
memory space. The memory is used in subsequent logic processing. However, some
initialization functions (memory has been allocated) do not provide the
corresponding memory release function. The involved code logic is too complex
and requires further attention.
Many release operations in the binutils source code depend on automatic release
upon process exit. The memory allocation operation does not provide the
corresponding memory release interface.

Leaked Memory:
++ tail -300 fuzz_as-address.log

Indirect leak of 32744 byte(s) in 1 object(s) allocated from:
#0 0x5224d2 in calloc
/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:154:3
#1 0x1163001 in xcalloc /src/binutils-gdb/libiberty/./xmalloc.c:162:12
#2 0x11544cf in htab_expand /src/binutils-gdb/libiberty/./hashtab.c:549:24
#3 0x1153c9a in htab_find_slot_with_hash
/src/binutils-gdb/libiberty/./hashtab.c:644:11
#4 0x5d1b7c in htab_insert /src/binutils-gdb/gas/hash.c:30:17
#5 0x5d5f0f in str_hash_insert /src/binutils-gdb/gas/./hash.h:104:17
#6 0x5d556b in md_begin /src/binutils-gdb/gas/config/tc-i386.c:3070:10
#7 0x5583ac in perform_an_assembly_pass
/src/binutils-gdb/gas/./fuzz_as.h:1219:3
#8 0x558773 in LLVMFuzzerTestOneInput /src/fuzz_as.c:55:3
#9 0x45ab31 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*,
unsigned long) /src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:556:15
#10 0x45a255 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long,
bool, fuzzer::InputInfo*, bool*)
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:470:3
#11 0x45cbfa in
fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::Fuzzer::vector >&)
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:748:5
#12 0x45cff9 in fuzzer::Fuzzer::Loop(std::Fuzzer::vector >&)
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:792:3
#13 0x44b508 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char
const*, unsigned long))
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:824:6
#14 0x475582 in main
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:19:10
#15 0x7f55516d782f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Indirect leak of 32744 byte(s) in 1 object(s) allocated from:
#0 0x5224d2 in calloc
/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:154:3
#1 0x1163001 in xcalloc /src/binutils-gdb/libiberty/./xmalloc.c:162:12
#2 0x11544cf in htab_expand /src/binutils-gdb/libiberty/./hashtab.c:549:24
#3 0x1153c9a in htab_find_slot_with_hash
/src/binutils-gdb/libiberty/./hashtab.c:644:11
#4 0x5d1b7c in htab_insert /src/binutils-gdb/gas/hash.c:30:17
#5 0x5d5f0f in str_hash_insert /src/binutils-gdb/gas/./hash.h:104:17
#6 0x5d556b in md_begin /src/binutils-gdb/gas/config/tc-i386.c:3070:10
#7 0x5583ac in perform_an_assembly_pass
/src/binutils-gdb/gas/./fuzz_as.h:1219:3
#8 0x558773 in LLVMFuzzerTestOneInput /src/fuzz_as.c:55:3
#9 0x45ab31 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*,
unsigned long) /src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:556:15
#10 0x45ca35 in
fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::Fuzzer::vector >&)
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:743:3
#11 0x45cff9 in fuzzer::Fuzzer::Loop(std::Fuzzer::vector >&)
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:792:3
#12 0x44b508 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char
const*, unsigned long))
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:824:6
#13 0x475582 in main
/src/llvm/projects/compiler-rt/lib/fuzzer/FuzzerMain.cpp:19:10
#14 0x7f55516d782f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Indirect leak of 4496 byte(s) in 281 object(s) allocated from:
#0 0x52235d in malloc
/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
#1 0x1162f48 in xmalloc /src/binutils-gdb/libiberty/./xmalloc.c:147:12
#2 0x5f8c3e in string_tuple_alloc /src/binutils-gdb/gas/./hash.h:67:27
#3 0x5d5eff in str_hash_insert /src/binutils-gdb/gas/./hash.h:103:25
#4 0x5d57d7 in md_begin /src/binutils-