<feed xmlns='http://www.w3.org/2005/Atom'>
<title>platform_external_elfutils/libdwfl, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/'/>
<entry>
<title>libdwfl: do not dlopen libdebuginfod.so in --disable-libdebuginfod mode</title>
<updated>2020-08-31T08:39:35+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2020-08-20T20:27:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=4ced3010ad1133159eb48bedda92af93e3a73d5a'/>
<id>4ced3010ad1133159eb48bedda92af93e3a73d5a</id>
<content type='text'>
debuginfod-client.c used to try to dlopen libdebuginfod.so even if
libdebuginfod was completely disabled using --disable-libdebuginfod.

Fix this by disabling build of debuginfod-client.c and disabling all
__libdwfl_debuginfod_* invocations in --disable-libdebuginfod mode.

Signed-off-by: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
debuginfod-client.c used to try to dlopen libdebuginfod.so even if
libdebuginfod was completely disabled using --disable-libdebuginfod.

Fix this by disabling build of debuginfod-client.c and disabling all
__libdwfl_debuginfod_* invocations in --disable-libdebuginfod mode.

Signed-off-by: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libdwfl, src: Replace some asserts with proper check or error messages.</title>
<updated>2020-07-19T12:17:19+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-07-04T22:33:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=49c200b7c7731d1ca12b465c20afa4c1475e671c'/>
<id>49c200b7c7731d1ca12b465c20afa4c1475e671c</id>
<content type='text'>
library code really shouldn't assert and for utilities a proper
error message is better than crashing with an assert.

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
library code really shouldn't assert and for utilities a proper
error message is better than crashing with an assert.

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libdwfl: read_address should use increasing address in intuit_kernel_bounds</title>
<updated>2020-06-28T13:27:25+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-06-28T13:27:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=eff30a6dabe52ac77ee5c6a0d31853fc8e3aeadb'/>
<id>eff30a6dabe52ac77ee5c6a0d31853fc8e3aeadb</id>
<content type='text'>
In kernels from 4.14 up to 4.19 in /proc/kallsyms there are special
__entry_SYSCALL_64_trampoline symbols. The problem is that they come
after the last kernel address, but before the module addresses.
And they are (much) smaller than the start address we found. This
confuses intuit_kernel_bounds and makes it fail.

Make sure to check read_address returns an increasing address when
searching for the end.

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

Reported-by: Vitaly Chikunov &lt;vt@altlinux.org&gt;
Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In kernels from 4.14 up to 4.19 in /proc/kallsyms there are special
__entry_SYSCALL_64_trampoline symbols. The problem is that they come
after the last kernel address, but before the module addresses.
And they are (much) smaller than the start address we found. This
confuses intuit_kernel_bounds and makes it fail.

Make sure to check read_address returns an increasing address when
searching for the end.

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

Reported-by: Vitaly Chikunov &lt;vt@altlinux.org&gt;
Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libdwfl: Flag an error if CIE return_address_register is invalid.</title>
<updated>2020-06-19T17:58:11+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-06-16T16:24:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=af008675ed00222d2caafb47391c65abb575e1a4'/>
<id>af008675ed00222d2caafb47391c65abb575e1a4</id>
<content type='text'>
If the CIE return address register is invalid (unknown) for the
architecture immediately flag an error and return.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the CIE return address register is invalid (unknown) for the
architecture immediately flag an error and return.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libdwfl: When we find a compressed image, use that, don't search for others</title>
<updated>2020-06-19T17:03:14+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-06-16T16:19:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=6e3693687850c538204f781e4e0fecbaa5adacdc'/>
<id>6e3693687850c538204f781e4e0fecbaa5adacdc</id>
<content type='text'>
We try to find a compressed vmlinux image ending with either .gz, bz2 or
xz. Stop searching if we find one. Otherwise we will leak a file descriptor
for an earlier one we opened.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We try to find a compressed vmlinux image ending with either .gz, bz2 or
xz. Stop searching if we find one. Otherwise we will leak a file descriptor
for an earlier one we opened.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libdwfl: Return failure from dwfl_standard_find_debuginfo for NULL module.</title>
<updated>2020-05-14T12:30:57+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-05-09T20:09:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=dca13089f93807f99f447b9b033ac27a43ff913f'/>
<id>dca13089f93807f99f447b9b033ac27a43ff913f</id>
<content type='text'>
GCC10 -fanalyzer plus -flto notices that some functions called by
dwfl_standard_find_debuginfo check that the given module isn't NULL,
but others expect it to be non-NULL. Just return a failure immediately
when a NULL mod is passed to dwfl_standard_find_debuginfo.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC10 -fanalyzer plus -flto notices that some functions called by
dwfl_standard_find_debuginfo check that the given module isn't NULL,
but others expect it to be non-NULL. Just return a failure immediately
when a NULL mod is passed to dwfl_standard_find_debuginfo.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libdwfl: Cleanup user_core resources on failure in dwfl_core_file_report.</title>
<updated>2020-05-14T12:30:57+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-05-08T21:35:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=101ca06966569e9edaa1c7eeb36e222903481414'/>
<id>101ca06966569e9edaa1c7eeb36e222903481414</id>
<content type='text'>
GCC10 -fanalyzer noticed that we allocate, but don't always cleanup the
dwfl-&gt;user_core if it wasn't set yet on error. In theory dwfl_module_end
should take care of it, but it is cleaner and less confusing to just do
it here.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC10 -fanalyzer noticed that we allocate, but don't always cleanup the
dwfl-&gt;user_core if it wasn't set yet on error. In theory dwfl_module_end
should take care of it, but it is cleaner and less confusing to just do
it here.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libdwfl: Handle debugaltlink in dwfl_standard_find_debuginfo.</title>
<updated>2020-04-30T22:00:28+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-04-30T21:57:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=b1d2404cc6ca0d9ce786e229a87c24db49163cfe'/>
<id>b1d2404cc6ca0d9ce786e229a87c24db49163cfe</id>
<content type='text'>
When we fall back to the debuginfod client then we need to do the
same trick we do for local lookups in dwfl_build_id_find_debuginfo.
If the debug file (dw) is already set, then we must be looking for
the altfile. But we cannot use the actual file/path name given as
hint. We'll have to lookup the alt file "build-id". Because the
debuginfod client only handles build-ids.

Previously we would use the build-id of the main file which meant
the debuginfod client would give us another copy of the debug file,
which would then be set as its own altfile. This caused lots of
confusion...

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we fall back to the debuginfod client then we need to do the
same trick we do for local lookups in dwfl_build_id_find_debuginfo.
If the debug file (dw) is already set, then we must be looking for
the altfile. But we cannot use the actual file/path name given as
hint. We'll have to lookup the alt file "build-id". Because the
debuginfod client only handles build-ids.

Previously we would use the build-id of the main file which meant
the debuginfod client would give us another copy of the debug file,
which would then be set as its own altfile. This caused lots of
confusion...

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libdwfl: Fix double free on failure path in gzip.c.</title>
<updated>2020-04-26T00:37:16+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-04-26T00:10:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=a894c63dba7019ceb8f6aa2c3cdcef519c65c92d'/>
<id>a894c63dba7019ceb8f6aa2c3cdcef519c65c92d</id>
<content type='text'>
GCC10 -fanalyzer found a double free when openstream failed. When
openstream fails __libdw_gunzip will call fail, which frees the
state-&gt;buffer. But openstream can call zlib_fail, which will also
call fail. Instead of calling zlib_fail, just return the error
that zlib_fail would have returned.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC10 -fanalyzer found a double free when openstream failed. When
openstream fails __libdw_gunzip will call fail, which frees the
state-&gt;buffer. But openstream can call zlib_fail, which will also
call fail. Instead of calling zlib_fail, just return the error
that zlib_fail would have returned.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libdwfl: Initialize bits to NULL in dwfl_standard_find_debuginfo for LTO.</title>
<updated>2020-04-16T15:45:31+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-04-16T15:45:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=39f28eaf8c821d71d57ffc759655ec4168d0bead'/>
<id>39f28eaf8c821d71d57ffc759655ec4168d0bead</id>
<content type='text'>
GCC10 LTO is too smart (and somewhat cryptic):

    find-debuginfo.c: In function ‘dwfl_standard_find_debuginfo’:
    debuginfod-client.c:85:8: error: ‘bits’ may be used uninitialized
    in this function [-Werror=maybe-uninitialized]
    find-debuginfo.c:360:24: note: ‘bits’ was declared here
    lto1: all warnings being treated as errors

So it inlines __libdwfl_debuginfod_find_debuginfo into
dwfl_standard_find_debuginfo and since it cannot see into the
function pointer (*fp_debuginfod_find_debuginfo), it assumes that
build_id_bit (== bits in dwfl_standard_find_debuginfo) will be used
by the called function and it might not be initialized.
But if you read the code the there is a check for build_id_len &gt; 0
to see whether bits is or isn't initialized before using bits.
But gcc isn't smart enough to figure that out.

Maybe that actually should be an heuristic gcc lto should use.
If the callchain I am inlining is so deep that I cannot figure out
maybe-uninitialized variables anymore I should stop inlining.

For now just help GCC out and initialize bits to NULL.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC10 LTO is too smart (and somewhat cryptic):

    find-debuginfo.c: In function ‘dwfl_standard_find_debuginfo’:
    debuginfod-client.c:85:8: error: ‘bits’ may be used uninitialized
    in this function [-Werror=maybe-uninitialized]
    find-debuginfo.c:360:24: note: ‘bits’ was declared here
    lto1: all warnings being treated as errors

So it inlines __libdwfl_debuginfod_find_debuginfo into
dwfl_standard_find_debuginfo and since it cannot see into the
function pointer (*fp_debuginfod_find_debuginfo), it assumes that
build_id_bit (== bits in dwfl_standard_find_debuginfo) will be used
by the called function and it might not be initialized.
But if you read the code the there is a check for build_id_len &gt; 0
to see whether bits is or isn't initialized before using bits.
But gcc isn't smart enough to figure that out.

Maybe that actually should be an heuristic gcc lto should use.
If the callchain I am inlining is so deep that I cannot figure out
maybe-uninitialized variables anymore I should stop inlining.

For now just help GCC out and initialize bits to NULL.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
