[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/26741] New: benign use after free at bfd/elfxx-riscv.c:140
From: |
msebor at gmail dot com |
Subject: |
[Bug binutils/26741] New: benign use after free at bfd/elfxx-riscv.c:1403 |
Date: |
Thu, 15 Oct 2020 23:17:54 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=26741
Bug ID: 26741
Summary: benign use after free at bfd/elfxx-riscv.c:1403
Product: binutils
Version: 2.36 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: msebor at gmail dot com
Target Milestone: ---
Building Binutils with an experimental version of GCC triggers the following
warning due to the subset pointer being used after it has been freed. The
pointer is indeterminate and using its value for any purpose (not just
dereferencing it) is undefined.
To avoid the warning, the two statements should be reversed.
/src/binutils-gdb/bfd/elfxx-riscv.c: In function ‘riscv_parse_subset’:
/src/binutils-gdb/bfd/elfxx-riscv.c:1403:27: warning: use after free
[-Wuse-after-free]
1403 | p += end_of_version - subset;
| ~~~~~~~~~~~~~~~^~~~~~~~
/src/binutils-gdb/bfd/elfxx-riscv.c:1402:7: note: freed by ‘free’ here
1402 | free (subset);
| ^~~~~~~~~~~~~
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/26741] New: benign use after free at bfd/elfxx-riscv.c:1403,
msebor at gmail dot com <=