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: <hjl dot tools at gmail dot com>, <nickc at redhat dot com>
- Cc: <binutils at sourceware dot org>, Pedro Alves <palves at redhat dot com>
- Date: Fri, 24 Nov 2017 15:53:03 -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;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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.
Simon