dwarf2_evaluate_loc_desc() in dwarf2loc.c
Carl Burch
cdb@cup.hp.com
Wed Jan 24 00:06:00 GMT 2007
I had a defect that wandered into dwarf2_evaluate_loc_desc() of
dwarf2loc.c, specificly the section (in the current FSF CVS top-of-trunk
version) :
if (size == 0)
{
retval = allocate_value (SYMBOL_TYPE (var));
VALUE_LVAL (retval) = not_lval;
set_value_optimized_out (retval, 1);
}
This then clause looks odd. If "size" actually is zero, then shouldn't
there be a "return retval;" to close that then block? If not, the
value allocated in that block leaks when "retval" is overwritten in
each case below that.
- Carl Burch
HP WDB Team
More information about the Gdb
mailing list