Am 17.03.2011 14:19, schrieb Tom Hughes:
> On 17/03/11 11:56, Stefan Kost wrote:
> 
>> there is no need for sarcasm. I am using valgrind for years. Just have a
>> look at the code:
>> http://buzztard.svn.sourceforge.net/viewvc/buzztard/trunk/buzztard/design/udev/udevls.c?revision=3231&view=markup#l40
>> There is no free. The data I am suppose to get from udev is static.
> 
> I did try and look at the code, but I couldn't find udevcls.c in the git
> repository you mentioned. I hadn't noticed that you had also linked to
> another repository.

Yes, that udevls is a small test to point out what I believe is a bug in udev.
It is not part of udev.

> 
> That code is using %s format strings to print both devnode1 and devnode2
> which are pointers returned from g_udev_device_get_device_file so my
> guess would be that freed memory is bring returned from that routine.

udev is saying that those pointer are static. I believe they are not under some
circumstances (as shown in the test and unovered by valgrind). I will have to
retest that with a newer udev, as udev deveopers seem to not be able to
reproduce it.

> 
> Insert some VALGRIND_CHECK_MEM_IS_DEFINED calls before the printf to
> validate the arguments and see what is causing the problem.

Thanks for the sugestions, the test is trivial and seems to be correct. Many
people looked at it. The reason why I posted this to the valgrind list was that
I was wondering why the test result is different when running it under valgrind.

But I guess thats not easy to explain.

Stefan

> 
> Tom
> 


------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to