This is the mail archive of the gdb-patches@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]

Re: [PATCH v2 28/31] Use ui_file_as_string throughout more


On 02/23/2017 10:22 AM, Yao Qi wrote:

>>  
>>    /* Value of this item.  */
>>    struct value *value;
>> @@ -67,6 +67,6 @@ struct varobj_iter_ops
>>        if ((ITER) != NULL)		       \
>>  	{				       \
>>  	  (ITER)->ops->dtor (ITER);	       \
>> -	  xfree (ITER);		       \
>> +	  delete (ITER);		       \
> 
> We don't need to use "delete" for varobj_iter, because you didn't add
> std::string member in varobj_iter.  This change causes an ASAN error,

Whoops.

> reverting the change above fixes the error.  We can also C++-fy
> varobj_iter, but I'd like to do in another patch.  How is the patch below?

LGTM.

Thanks,
Pedro Alves


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