Brice Goglin, on Tue 26 Apr 2016 15:45:49 +0200, wrote:
> The Hardware Locality (hwloc) team is pleased to announce the release
> of v1.11.3:

I'm getting one testsuite issue:

FAIL: 16-2gr2gr2n2c+misc.xml

(gdb) bt
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007ffff7346d8e in __GI___strdup (s=0x0) at strdup.c:41
#2  0x00000000004032ee in hwloc_utils_userdata_import_cb (topology=0x62a520, 
obj=0x639c00, name=0x639330 "normal:MyName0", 
    buffer=0x0, length=0) at ../../utils/hwloc/misc.h:312
#3  0x00007ffff7bb48e1 in hwloc__xml_import_userdata (topology=0x62a520, 
obj=0x639c00, state=0x7fffffffd2f0)
    at topology-xml.c:624
#4  0x00007ffff7bb519e in hwloc__xml_import_object (topology=0x62a520, 
data=0x6399d0, obj=0x639c00, state=0x7fffffffd3e0)
    at topology-xml.c:766
#5  0x00007ffff7bb5b27 in hwloc_look_xml (backend=0x6398e0) at 
topology-xml.c:1021
#6  0x00007ffff7b9d962 in hwloc_discover (topology=0x62a520) at topology.c:2499
#7  0x00007ffff7b9e974 in hwloc_topology_load (topology=0x62a520) at 
topology.c:2994
#8  0x00000000004054e7 in main (argc=0, argv=0x7fffffffd728) at lstopo.c:734

312       u->buffer = strdup(buffer);
(gdb) p buffer
$1 = (const void *) 0x0

624           topology->userdata_import_cb(topology, obj, fakename,
buffer, length);
(gdb) p buffer
$2 = 0x0

so it looks like

617           ret = state->global->get_content(state, &buffer, reallength);

didn't actually fill buffer, but

(gdb) p name
$13 = 0x64ff4c "MyName0"
(gdb) p encoded
$10 = 0
(gdb) p length
$11 = 0
(gdb) p reallength
$12 = 0

so maybe that's "expected" :)

I'll be using the attached patch in Debian.

Samuel
diff --git a/src/topology-xml.c b/src/topology-xml.c
index 220afd1..35fb19e 100644
--- a/src/topology-xml.c
+++ b/src/topology-xml.c
@@ -612,7 +612,7 @@ hwloc__xml_import_userdata(hwloc_topology_t topology 
__hwloc_attribute_unused, h
       return -1;

   } else if (topology->userdata_not_decoded) {
-      char *buffer, *fakename;
+      char *buffer = "", *fakename;
       size_t reallength = encoded ? BASE64_ENCODED_LENGTH(length) : length;
       ret = state->global->get_content(state, &buffer, reallength);
       if (ret < 0)

Reply via email to