[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/11983] New: libbfd reuses pointer passed to bfd_openr
From: |
carlo at alinoe dot com |
Subject: |
[Bug binutils/11983] New: libbfd reuses pointer passed to bfd_openr |
Date: |
5 Sep 2010 15:55:15 -0000 |
When calling bfd_openr(filename, NULL), the filename pointer is stored
as-is and reused to reopen the bfd in the case of caching and multiple
opened bfd's. At VERY least this should be documented clearly :/
What I'm doing (a use case where the above causes problems) is:
Some initialization function opens /proc/self/maps and finds all
shared libraries, which are passed to bfd_openr. The filenames passed
are on the stack. Mysteriously, looking up source / linenumber info
starts failing if you open too many files.
The reason is that if too many bfd's are opened, they are closed and
reopened using the filename pointer, obviously resulting in ENOENT because
the location that the filename pointer is pointing to contains rubbish
in mean time.
--
Summary: libbfd reuses pointer passed to bfd_openr
Product: binutils
Version: 2.20
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: carlo at alinoe dot com
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11983
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/11983] New: libbfd reuses pointer passed to bfd_openr,
carlo at alinoe dot com <=
- [Bug binutils/11983] libbfd reuses pointer passed to bfd_openr, nickc at redhat dot com, 2010/09/08
- [Bug binutils/11983] libbfd reuses pointer passed to bfd_openr, nickc at redhat dot com, 2010/09/08
- [Bug binutils/11983] libbfd reuses pointer passed to bfd_openr, nickc at redhat dot com, 2010/09/09
- [Bug binutils/11983] libbfd reuses pointer passed to bfd_openr, nickc at redhat dot com, 2010/09/09
- [Bug binutils/11983] libbfd reuses pointer passed to bfd_openr, carlo at alinoe dot com, 2010/09/27