daschl/hwloc-rs

Segfault when calling object.name()

gz opened this issue · 0 comments

gz commented

The following code leads to a segfault on MacOS

pub fn debug_topology() {
    let topo = Topology::new();
	for i in 0..topo.depth() {
		println!("*** Objects at level {}", i);

		for (idx, object) in topo.objects_at_depth(i).iter().enumerate() {
			println!("{}", object.name());
		}
	}
}

Program aborts with:

error: process didn't exit successfully: `/Users/gz/workspace/node-replication/target/release/deps/criterion_bench-398cce13a8a29333 --bench` (signal: 11, SIGSEGV: invalid memory reference)

lstopo version is:

$ lstopo --version
lstopo 1.11.5