This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

dwarf2_evaluate_loc_desc() in dwarf2loc.c


   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
						  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]