[libvirt] [PATCH] tests: avoid crash when run under gcov

Eric Blake eblake at redhat.com
Wed May 11 16:41:09 UTC 2011


On 05/11/2011 09:57 AM, Eric Blake wrote:
> Running ./autobuild.sh failed when gcov is installed, because
> commandtest ended up crashing during gcov's getenv() call after
> exit() had already started.  I traced this nasty bug back to
> a scoping issue present since the test introduction.
> 
> * tests/commandtest.c (mymain): Move newenv...
> (newenv): ...to a scope that is still useful during exit().

P.S. I think that's a bug in gcov for calling getenv("GCOV_PREFIX")
multiple times during the program.  Since the program can change it's
own environment, gcov should only be calling getenv() once during
startup and caching the results for the life of the program.  So I filed:

https://bugzilla.redhat.com/show_bug.cgi?id=703919

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110511/2320ca0f/attachment-0001.sig>


More information about the libvir-list mailing list