Issue 66570 in oss-fuzz: binutils:fuzz_objdump_safe: Out-of-memory in fuzz_objdump_safe

2024-05-01 Thread sheriffbot via monorail
Updates:
Labels: Deadline-Approaching

Comment #2 on issue 66570 by sheriffbot: binutils:fuzz_objdump_safe: 
Out-of-memory in fuzz_objdump_safe
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66570#c2

This bug is approaching its deadline for being fixed, and will be automatically 
derestricted within 7 days. If a fix is planned within 2 weeks after the 
deadline has passed, a grace extension can be granted.

- Your friendly Sheriffbot

-- 
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.

[Bug gas/31685] Issues when casting _Float16 to __bf16

2024-05-01 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31685

H.J. Lu  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=114907

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


[Bug binutils/31692] New: objdump fails .debug_info size check for compressed debug information

2024-05-01 Thread laanwj at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31692

Bug ID: 31692
   Summary: objdump fails .debug_info size check for compressed
debug information
   Product: binutils
   Version: 2.43 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: laanwj at gmail dot com
  Target Milestone: ---

Versions: HEAD as of 75d933919d8e99c85054bdbf3a0bee0235f2bd3b and 2.42

objdump fails a .debug_info size check for large binaries produced by gcc/ld,
that have a compressed debug section.

To reproduce:
-
$ wget
https://bitcoincore.org/bin/bitcoin-core-27.0/bitcoin-27.0-x86_64-linux-gnu-debug.tar.gz
$ tar -zxvf bitcoin-27.0-x86_64-linux-gnu-debug.tar.gz
$ objdump -Wi bitcoin-27.0/bin/bitcoind.dbg
Section '.debug_info' has an invalid size: 0.
-

This issue is very similar to
https://sourceware.org/bugzilla/show_bug.cgi?id=24319 , which was closed as
FIXED RESOLVED, but there may be a similar issue left.

The error arises in the following code in binutils/objdump.c, a check for
32-bit systems (note that this happens on a 64-bit system):
-
  /* PR 24360: On 32-bit hosts sizeof (size_t) < sizeof (bfd_size_type). */
  alloced = amt = section->size + 1;
  if (alloced != amt
  || alloced == 0
  || (bfd_get_size (abfd) != 0 && alloced >= bfd_get_size (abfd)))
{
  section->start = NULL;
  free_debug_section (debug);
  printf (_("\nSection '%s' has an invalid size: %#" PRIx64 ".\n"),
  sanitize_string (section->name),
  section->size);
  return false;
}
-

Two problems with this:

- The reason it prints size 0 (and not the real value, 0x976cf8b) is that
`free_debug_section` sets section->size to 0.

- It compares the size of the section against `bfd_get_size` (0x5ed10b0) which
is (afaik) the size of the binary. But as this is a compressed section it can
legitly be larger than the binary.

Removing the check makes it work.

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


[Bug binutils/24319] Compressed / uncompressed debug info confusion in BFD

2024-05-01 Thread laanwj at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24319

Wladimir van der Laan  changed:

   What|Removed |Added

 CC||laanwj at gmail dot com

--- Comment #6 from Wladimir van der Laan  ---
We're running up against a very similar issue, making a new bug because this
was closed: https://sourceware.org/bugzilla/show_bug.cgi?id=31692

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