Region reference to zero size region broken in HDF5 1.10.6?


#1

h5py has a couple of tests that check creating a region reference to a zero-size region (a dataspace with no points selected). These passed with HDF5 1.10.5, but have started failing with 1.10.6. Is this an oversight, or is the new behaviour expected?

Specifically, here’s an example using the low level h5py API (which maps directly to HDF5 API calls):

In [3]: f = h5py.File('/home/takluyver/scratch/region-1.10.6.h5', 'w')                                     

In [4]: f['a'] = np.arange(10)                                                                             

In [5]: ds = f['a']                                                                                        

In [6]: sid = ds.id.get_space()                                                                            

In [7]: sid.select_none()                                                                                  

In [8]: sid.get_select_npoints()                                                                           
Out[8]: 0

In [9]: ref = h5py.h5r.create(ds.id, b'.', h5py.h5r.DATASET_REGION, sid)                                   

In [10]: sid2 = h5py.h5r.get_region(ref, ds.id)                                                            

In [11]: sid2.get_select_npoints()                                                                         
Out[11]: 10
# ^ Expected 0 here; HDF5 1.10.5 gives 0

In [12]: h5py.version.hdf5_version                                                                         
Out[12]: '1.10.6'

Edit: here’s the h5py issue, if you want to check the actual test failures we’re seeing - one with a regular (‘simple’) dataspace, one with a scalar dataspace: https://github.com/h5py/h5py/issues/1492

I checked the HDF5 1.10.6 release notes and couldn’t see anything about region references.


#2

Ping? I’d like to know whether this is a bug in HDF5 1.10.6 - in which case we’ll mark those tests as expected failures - or expected behaviour - in which case we’ll need to adapt somehow.


#3

Thomas,

We will need to investigate. I entered an issue HDFFV-11055. We will need to reproduce it in C first.

Thank you for reporting!

Elena


#4

We investigated the issue (see comments to HDFFV-11055) and reproduced with a simple C program. It is a bug in 1.10.6, it is not present in 1.12.0.

I created a new issue HDFFV-11067. Thanks again for reporting.


#5

The HDF5 issue was resolved and fix is in 1_10 branch.