This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] elf: Properly compute offsets of desc and next note
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, Binutils <binutils at sourceware dot org>, Pedro Alves <palves at redhat dot com>
- Date: Fri, 24 Nov 2017 17:42:51 -0500
- Subject: Re: [PATCH] elf: Properly compute offsets of desc and next note
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- References: <5028c35a-6bbd-0e14-a428-5a87e5ed7c61@ericsson.com> <CAMe9rOrMPh-UfUfMyZ9Zm05oVnmzEUHfKTujVcn2q5ZRFKqH6Q@mail.gmail.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 2017-11-24 05:20 PM, H.J. Lu wrote:
> On Fri, Nov 24, 2017 at 12:53 PM, Simon Marchi
> <simon.marchi@ericsson.com> wrote:
>> Hi,
>>
>> Pedro found that this patch caused the GDB test "gdb.base/auxv.exp" to
>> consume memory until the machine becomes unresponsive. I was able to
>> reproduce it too, so I chose to revert the patch, to reduce the risk
>> of it happening on other developer's machines and buildbot builders.
>>
>> The test can be ran with:
>>
>> gdb/$ make check TESTS="gdb.base/auxv.exp"
>>
>> (It's a good idea to ctrl-C quickly enough :))
>>
>> After running the test once, I was able to reproduce the issue by starting
>> GDB manually like this:
>>
>> gdb/$ ./gdb -ex "core /home/emaisin/build/binutils-gdb/gdb/testsuite/outputs/gdb.base/auxv/auxv.corefile"
>>
>> There is an infinite loop in elf_parse_notes, the pointer "p" never
>> gets advanced.
>>
>
> This patch fixes the problem for me. Please give it a try.
>
> Thanks.
It works fine on my side, thanks.
Simon