* [commited patch] fix ELF segment vs. loadable section check
@ 2008-07-21 5:08 Chris Demetriou
2008-07-21 11:50 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Chris Demetriou @ 2008-07-21 5:08 UTC (permalink / raw)
To: gdb-patches; +Cc: cgd, sposelenov
This patch was originally sent by Sergei Poselenov in
http://sourceware.org/ml/gdb/2007-12/msg00146.html -- I just tested it
and added a changelog entry.
tested by...
* build/check on i686-linux before after (no changes)
* hand-crafted test case which triggered the warning before, verified
that it went away after the fix.
committed as obvious.
chris
--
2008-07-20 Sergei Poselenov <sposelenov@emcraft.com>
Chris Demetriou <cgd@google.com>
* elfread.c (elf_symfile_segments): Fix the check that each loadable
section fits within an ELF segment to handle ELF segments that hit
the end of the address space.
Index: elfread.c
===================================================================
RCS file: /cvs/src/src/gdb/elfread.c,v
retrieving revision 1.72
diff -u -u -p -r1.72 elfread.c
--- elfread.c 14 May 2008 18:14:34 -0000 1.72
+++ elfread.c 21 Jul 2008 05:02:47 -0000
@@ -108,7 +108,7 @@ elf_symfile_segments (bfd *abfd)
for (j = 0; j < num_segments; j++)
if (segments[j]->p_memsz > 0
&& vma >= segments[j]->p_vaddr
- && vma < segments[j]->p_vaddr + segments[j]->p_memsz)
+ && (vma - segments[j]->p_vaddr) < segments[j]->p_memsz)
{
data->segment_info[i] = j + 1;
break;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [commited patch] fix ELF segment vs. loadable section check
2008-07-21 5:08 [commited patch] fix ELF segment vs. loadable section check Chris Demetriou
@ 2008-07-21 11:50 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2008-07-21 11:50 UTC (permalink / raw)
To: Chris Demetriou; +Cc: gdb-patches, sposelenov
On Sun, Jul 20, 2008 at 10:08:12PM -0700, Chris Demetriou wrote:
> This patch was originally sent by Sergei Poselenov in
> http://sourceware.org/ml/gdb/2007-12/msg00146.html -- I just tested it
> and added a changelog entry.
>
> tested by...
> * build/check on i686-linux before after (no changes)
> * hand-crafted test case which triggered the warning before, verified
> that it went away after the fix.
>
> committed as obvious.
Thanks.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-21 11:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-21 5:08 [commited patch] fix ELF segment vs. loadable section check Chris Demetriou
2008-07-21 11:50 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox