"Gonglei (Arei)" <[email protected]> writes:

>> -----Original Message-----
>> From: Gerd Hoffmann [mailto:[email protected]]
>> Sent: Tuesday, May 27, 2014 5:25 PM
>> To: Gonglei (Arei)
>> Cc: [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected]
>> Subject: Re: [RFC] qdict: issue about usb controller hot-plug/unplug
>> 
>> On Di, 2014-05-27 at 08:28 +0000, Gonglei (Arei) wrote:
>> > Hi,
>> >
>> > Those day, I'm working for usb controller hot-plugging/unplugging(
>> > not enable multifunction capability). Everything work well, but when
>> > I test the case of hot-plug/unplug reiteratively, qemu will be aborted:
>> 
>> Guess you've removed the "dc->hotpluggable = false" and added a cleanup
>> function?
>> 
> Hum...That's it!
>
>> > I don't know why the new qdict address will conflict with the global usb
>> busses. tqh_last?
>> 
>> Most likely something is missing in the cleanup, leading to a
>> use-after-free.
>> 
>> Usually Electric Fence is pretty good at catching them.
>> http://www.pf-lug.de/projekte/haya/efence.php

Another useful tool for pinpointing use-after-free and similar at
runtime is valgrind.

> I haven't use the tools before, but I am using Coverity for qemu code 
> recently, 
> hope I can get some useful clue. 
>
> Thanks for your remind, Gerd.

I've found Coverity useful, too.

Reply via email to