<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/elfutils.git/src/nm.c, branch debuginfod</title>
<subtitle>sourceware.org: git/elfutils.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/'/>
<entry>
<title>nm: Fix latent memory leak in show_symbols.</title>
<updated>2019-08-29T15:46:52+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-08-29T15:46:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=df33285b60290fadefd140ee2fe616f750105d2f'/>
<id>df33285b60290fadefd140ee2fe616f750105d2f</id>
<content type='text'>
If there are just a handful of symbols then memory for them is
allocated on the stack, otherwise the memory is malloced. So before
freeing the memory we need to check the number of entries to know if
the memory was heap allocated or not. But since not all entries might
be used we might have decreased the number of entries to the number
we will actually show. Remember the original symbol entries to not
have a memory leak.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there are just a handful of symbols then memory for them is
allocated on the stack, otherwise the memory is malloced. So before
freeing the memory we need to check the number of entries to know if
the memory was heap allocated or not. But since not all entries might
be used we might have decreased the number of entries to the number
we will actually show. Remember the original symbol entries to not
have a memory leak.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nm: Simplify naming of invalid sections, check shdr isn't NULL.</title>
<updated>2019-04-28T15:51:06+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-04-28T15:51:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=207d8ec3778a3101ee1b8ece9c63c0ff97450789'/>
<id>207d8ec3778a3101ee1b8ece9c63c0ff97450789</id>
<content type='text'>
When shdr is NULL or the sh_name index is invalid, don't try to use
it.  Just call the section "[invalid section name]". Don't try to be
too smart by creating a dynamic invalid name using alloca to simplify
memory usage in this exceptional case.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When shdr is NULL or the sh_name index is invalid, don't try to use
it.  Just call the section "[invalid section name]". Don't try to be
too smart by creating a dynamic invalid name using alloca to simplify
memory usage in this exceptional case.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Consolidate error.h inclusion in system.h</title>
<updated>2018-07-05T19:06:40+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2018-07-04T11:11:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=e893aab0d12284c8909ebacfca529c0b554abb9c'/>
<id>e893aab0d12284c8909ebacfca529c0b554abb9c</id>
<content type='text'>
error.h isn't standard and so isn't part of the musl C library.
To easy future porting, consolidate the inclusion of error.h into system.h.

https://sourceware.org/bugzilla/show_bug.cgi?id=21008

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
error.h isn't standard and so isn't part of the musl C library.
To easy future porting, consolidate the inclusion of error.h into system.h.

https://sourceware.org/bugzilla/show_bug.cgi?id=21008

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Move print_version into printversion.{h|c}</title>
<updated>2017-02-17T09:55:28+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2017-02-16T11:32:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=e22cc80923f94e54c9384421904461958899db5b'/>
<id>e22cc80923f94e54c9384421904461958899db5b</id>
<content type='text'>
Rename version.c so that the implementation is called after the header
and the header doesn't clash with the toplevel version.h. print_version
depends on argp and is only used in the tools.

Signed-off-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename version.c so that the implementation is called after the header
and the header doesn't clash with the toplevel version.h. print_version
depends on argp and is only used in the tools.

Signed-off-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Move color handling into a separate header</title>
<updated>2017-02-15T14:24:24+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2017-02-14T13:30:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=29173849c445b178a97e400c071f25629a4f8b9f'/>
<id>29173849c445b178a97e400c071f25629a4f8b9f</id>
<content type='text'>
We only need it in nm.c and objdump.c, but it pulls in argp as
dependency. By dropping it from libeu.h, the libraries can be
compiled without argp.

Signed-off-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We only need it in nm.c and objdump.c, but it pulls in argp as
dependency. By dropping it from libeu.h, the libraries can be
compiled without argp.

Signed-off-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>http://elfutils.org/ is now hosted at http://sourceware.org/elfutils/</title>
<updated>2016-12-24T21:51:32+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2016-12-24T21:31:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=1700fd25e6caf26663af2bd994d1d99fab9df59f'/>
<id>1700fd25e6caf26663af2bd994d1d99fab9df59f</id>
<content type='text'>
fedorahosted used to be our home, but we are now hosted at sourceware.

Change the elfutils project home to http://elfutils.org/
Point hosted services (email, release, git, bug tracker and web pages)
to https://sourceware.org/elfutils/

Move design notes from README to NOTES.
Add URLs for home, releases, bugs, git and mailinglist to README.

Make the --version output of all tools the same by using a common
print_version function and update the publicly shown copyright holder
to the elfutils developers.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fedorahosted used to be our home, but we are now hosted at sourceware.

Change the elfutils project home to http://elfutils.org/
Point hosted services (email, release, git, bug tracker and web pages)
to https://sourceware.org/elfutils/

Move design notes from README to NOTES.
Add URLs for home, releases, bugs, git and mailinglist to README.

Make the --version output of all tools the same by using a common
print_version function and update the publicly shown copyright holder
to the elfutils developers.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: Provide MAX and MIN in system.h</title>
<updated>2016-10-12T13:43:14+00:00</updated>
<author>
<name>Akihiko Odaki</name>
<email>akihiko.odaki.4i@stu.hosei.ac.jp</email>
</author>
<published>2016-10-11T14:06:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=60b2bf1b08c621492410b24e469b2bdf58d167d5'/>
<id>60b2bf1b08c621492410b24e469b2bdf58d167d5</id>
<content type='text'>
This change also creates a new header file libeu.h to provide the
prototypes for the function of libeu. That hides the definition of function
crc32, which can conflict with zlib, from libelf. It also prevents mistakes
to refer those functions from a component which doesn't link with libeu,
such as libelf.

Signed-off-by: Akihiko Odaki &lt;akihiko.odaki.4i@stu.hosei.ac.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change also creates a new header file libeu.h to provide the
prototypes for the function of libeu. That hides the definition of function
crc32, which can conflict with zlib, from libelf. It also prevents mistakes
to refer those functions from a component which doesn't link with libeu,
such as libelf.

Signed-off-by: Akihiko Odaki &lt;akihiko.odaki.4i@stu.hosei.ac.jp&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nm: Check for malloc size argument overflow in show_symbols.</title>
<updated>2016-03-21T15:09:42+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mjw@redhat.com</email>
</author>
<published>2016-03-21T15:01:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=911f11a0054264ffbfae8f8e400aea52b8d1d620'/>
<id>911f11a0054264ffbfae8f8e400aea52b8d1d620</id>
<content type='text'>
Reported-by: Florian Weimer &lt;fweimer@redhat.com&gt;
Signed-off-by: Mark Wielaard &lt;mjw@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported-by: Florian Weimer &lt;fweimer@redhat.com&gt;
Signed-off-by: Mark Wielaard &lt;mjw@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nm: If the file is ET_REL and we need Dwarf use libdwfl to get it relocated.</title>
<updated>2016-01-02T19:37:45+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mjw@redhat.com</email>
</author>
<published>2015-12-02T15:57:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=70cd907e38757283f3696465771f723a342cc3d1'/>
<id>70cd907e38757283f3696465771f723a342cc3d1</id>
<content type='text'>
If we need Dwarf and the file is ET_REL use the same trick as in readelf
to get a relocated Dwarf. Otherwise lots of references in the debug_info
will come out as zero.

This also explains the "bogus" Dwarf seen that caused the memory leak in
the local_root that was fixed previously.

Signed-off-by: Mark Wielaard &lt;mjw@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we need Dwarf and the file is ET_REL use the same trick as in readelf
to get a relocated Dwarf. Otherwise lots of references in the debug_info
will come out as zero.

This also explains the "bogus" Dwarf seen that caused the memory leak in
the local_root that was fixed previously.

Signed-off-by: Mark Wielaard &lt;mjw@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nm: Don't leak duplicate Dwarf local names.</title>
<updated>2016-01-02T19:37:45+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mjw@redhat.com</email>
</author>
<published>2015-12-02T15:44:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=3fbd857267a6bffc57225857690aaa383ac58426'/>
<id>3fbd857267a6bffc57225857690aaa383ac58426</id>
<content type='text'>
Badly formed DWARF can have duplicate local names. In which case we do
want to detect those so we don't leak the memory.

Signed-off-by: Mark Wielaard &lt;mjw@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Badly formed DWARF can have duplicate local names. In which case we do
want to detect those so we don't leak the memory.

Signed-off-by: Mark Wielaard &lt;mjw@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
