This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
RE: Is it possible to overflow baton->size in dwarf_mark_symbols_computed() in dwarf2read.c?
- From: "Cuthbertson, Reva D." <reva_cuthbertson at hp dot com>
- To: "Daniel Jacobowitz" <drow at false dot org>
- Cc: <gdb at sources dot redhat dot com>
- Date: Fri, 13 May 2005 08:59:18 -0700
- Subject: RE: Is it possible to overflow baton->size in dwarf_mark_symbols_computed() in dwarf2read.c?
Your suggestion worked.
Thanks so much!
Reva Cuthbertson
reva.cuthbertson@hp.com
-----Original Message-----
From: Daniel Jacobowitz [mailto:drow@false.org]
Sent: Friday, May 13, 2005 8:40 AM
To: Cuthbertson, Reva D.
Cc: gdb@sources.redhat.com
Subject: Re: Is it possible to overflow baton->size in
dwarf_mark_symbols_computed() in dwarf2read.c?
On Fri, May 13, 2005 at 08:37:41AM -0700, Cuthbertson, Reva D. wrote:
> Yes, I ran into the problem. I tried changing the declaration of the
> "size" field in dwarf2_loclist_baton and dwarf2_locexpr_baton in
> dwarf2loc.h to be an unsigned integer instead and that seemed to fix
the
> problem I encountered. Do you think this a reasonable solution?
No. It should saturate instead; it only needs to be longer than any
supported location list/expression, and 64k is entirely reasonable for
that. Int would waste a lot of memory.
Could you try that? Something like if (expression < 65536) ->size =
expression; else size = 65535;
--
Daniel Jacobowitz
CodeSourcery, LLC