Bug 1281577 - virt-inspector --xpath segfault on attribute get
virt-inspector --xpath segfault on attribute get
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-12 15:42 EST by Richard Tollerton
Modified: 2015-11-13 14:00 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-13 14:00:21 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard Tollerton 2015-11-12 15:42:56 EST
`virsh dumpxml dom | xmlstarlet sel -t -v '//domain/devices/interface[1]/mac/@address'` does what I'd expect and prints out the MAC. But `virsh dumpxml dom | virt-inspector --xpath '//domain/devices/interface[1]/mac/@address'` segfaults.

Stack trace:

#0  0x00007ffff6fb7ac4 in free () from /usr/lib/libc.so.6
#1  0x00007ffff75538d9 in xmlFreeNodeList () from /usr/lib/libxml2.so.2
#2  0x00007ffff7553696 in xmlFreeDoc () from /usr/lib/libxml2.so.2
#3  0x0000000000409dcc in guestfs_int_cleanup_xmlFreeDoc (ptr=0x7fffffffdc28)
    at cleanup.c:87
#4  0x0000000000409be2 in do_xpath (
    query=0x7fffffffe1a6 "//domain/devices/interface[1]/mac/@address")
    at inspector.c:805
#5  0x0000000000406f30 in main (argc=3, argv=0x7fffffffddd8) at inspector.c:250


Running version 1.30.4 on archlinux.
Comment 1 Richard W.M. Jones 2015-11-12 17:15:30 EST
I can reproduce this on 1.31.25 too.
Comment 2 Richard W.M. Jones 2015-11-12 17:43:35 EST
Patch posted:
https://www.redhat.com/archives/libguestfs/2015-November/msg00133.html
Comment 3 Richard Tollerton 2015-11-13 13:48:16 EST
I've validated the fix in a build from master.
Comment 4 Richard W.M. Jones 2015-11-13 14:00:21 EST
Fixed in 1.31.26.

Note You need to log in before you can comment on or make changes to this bug.