The pointers calculation included a typo which caused segfaults. Signed-off-by: Leonid Podolny <leonid@xxxxxxxxxxx> --- domain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain.go b/domain.go index 515138a..74061c2 100644 --- a/domain.go +++ b/domain.go @@ -3887,7 +3887,7 @@ func (d *Domain) GetIOThreadInfo(flags DomainModificationImpact) ([]DomainIOThre info := make([]DomainIOThreadInfo, int(ret)) for i := 0; i < int(ret); i++ { - cinfo := (*(**C.virDomainIOThreadInfo)(unsafe.Pointer(uintptr(unsafe.Pointer(cinfolist)) + (unsafe.Sizeof(*cinfolist) + uintptr(i))))) + cinfo := (*(**C.virDomainIOThreadInfo)(unsafe.Pointer(uintptr(unsafe.Pointer(cinfolist)) + (unsafe.Sizeof(*cinfolist) * uintptr(i))))) ncpus := int(cinfo.cpumaplen * 8) cpumap := make([]bool, ncpus) -- 2.11.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list