[PATCH] elf: Properly compute offsets of desc and next note

H.J. Lu hjl.tools@gmail.com
Fri Nov 24 22:54:00 GMT 2017


On Fri, Nov 24, 2017 at 2:42 PM, Simon Marchi <simon.marchi@ericsson.com> wrote:
> 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.
>

Here is the patch against master branch.   Please give it try.

Thanks.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Re-apply-elf-Properly-compute-offsets-of-note-descri.patch
Type: text/x-patch
Size: 8003 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20171124/331e5924/attachment.bin>


More information about the Binutils mailing list