[libvirt] Confusing valgrind error in virDomainLookupByUUIDString or virReportErrorHelper

libvirt-0.9.2-2.fc16.x86_64 Here's the error from valgrind: ==24953== Conditional jump or move depends on uninitialised value(s) ==24953== at 0x3DF68844BB: __GI___strcasecmp_l (strcmp.S:243) ==24953== by 0x3DF68221E1: __gconv_open (gconv_open.c:70) ==24953== by 0x3DF682F3E9: _nl_find_msg (dcigettext.c:974) ==24953== by 0x3DF682FB84: __dcigettext (dcigettext.c:640) ==24953== by 0x36BBE5A063: virReportErrorHelper (virterror.c:1215) ==24953== by 0x36BBEA3804: virDomainLookupByUUIDString (libvirt.c:2005) ==24953== by 0x4C9174C: guestfs__add_domain (virt.c:122) ==24953== by 0x4C4862B: guestfs_add_domain_argv (actions.c:2951) ==24953== by 0x42635A: add_libvirt_drives (virt.c:54) ==24953== by 0x4260D8: add_drives (options.c:69) ==24953== by 0x40B1F6: main (fish.c:422) It appears to originate from this code: src/libvirt.c:virDomainLookupByUUIDString: if (virUUIDParse(uuidstr, uuid) < 0) { 2005 ** virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__); goto error; } The macro at line 2005 expands to: virReportErrorHelper(VIR_FROM_NONE, VIR_ERR_INVALID_ARG, __FILE__, \ __FUNCTION__, __LINE__, __FUNCTION__); Apparently __FUNCTION__ is deprecated[1]. When virReportErrorHelper is called, the problem appears to be at this line (virterror.c:1215): virerr = virErrorMsg(errcode, (errorMessage[0] ? errorMessage : NULL)); Here, errcode == VIR_ERR_INVALID_ARG and errorMessage is presumably the function name. That's as far as I've got for today. Just letting people know ... Rich. [1] http://gcc.gnu.org/onlinedocs/gcc/Function-Names.html -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org

On 06/27/2011 10:32 AM, Richard W.M. Jones wrote:
libvirt-0.9.2-2.fc16.x86_64
fc16 implies rawhide
Here's the error from valgrind:
==24953== Conditional jump or move depends on uninitialised value(s) ==24953== at 0x3DF68844BB: __GI___strcasecmp_l (strcmp.S:243) ==24953== by 0x3DF68221E1: __gconv_open (gconv_open.c:70) ==24953== by 0x3DF682F3E9: _nl_find_msg (dcigettext.c:974) ==24953== by 0x3DF682FB84: __dcigettext (dcigettext.c:640) ==24953== by 0x36BBE5A063: virReportErrorHelper (virterror.c:1215)
__dcigettext is a glibc function. Sounds to me like valgrind is being noisy about a recent glibc code change; this is likely a case of a missing valgrind suppression file, and less likely an actual glibc bug.
Apparently __FUNCTION__ is deprecated[1].
Most likely a red herring. We already '#define __FUNCTION__ __func__' for any other C99 compliant compiler, so now it's just a global cleanup to decide whether to consistently use gcc style or C99 style.
That's as far as I've got for today. Just letting people know ...
I'll see if I can reproduce it. But since you were testing rawhide, my guess is that it is a rawhide glibc/valgrind mismatch and not an actual libvirt shortcoming. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Richard W.M. Jones