mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-12-27 08:01:04 +08:00
[svn-r25620] Fix a bug in multi VFD when the memb_addr in H5Pset_fapl_multi is passed
as NULL. The library is supposed in that case to equally divide the address space among all members, but there was a bug causing an overflow in the assignment. tested with h5commitest
This commit is contained in:
parent
52d5e22956
commit
a881862802
@ -491,7 +491,7 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
|
|||||||
}
|
}
|
||||||
if (!memb_addr) {
|
if (!memb_addr) {
|
||||||
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
|
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
|
||||||
_memb_addr[mt] = (hsize_t)(mt ? (mt - 1) : 0) * HADDR_MAX / H5FD_MEM_NTYPES;
|
_memb_addr[mt] = (hsize_t)(mt ? (mt - 1) : 0) * (HADDR_MAX / H5FD_MEM_NTYPES);
|
||||||
memb_addr = _memb_addr;
|
memb_addr = _memb_addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user