Mark,

Thank you for the patch that illustrates the problem! It really saves a lot of 
investigation time!

HDF5 doesn’t support nested committed datatypes. In your example, when 
committed VL string is used as a member of the compound datatype, it is treated 
as a regular datatype. You can easily see it by using h5ls on the created 
dtypes1.h5 file. In the output below, cmp_type and str_type are shared 
(committed), but “vlstr” member of the cpm_type type is shown as a regular 
datatype.

[epourmal@jam test]$ h5ls -v dtypes1.h5
Opened "dtypes1.h5" with sec2 driver.
cmp_dset                 Dataset {3/3}
    Location:  1:1272
    Links:     1
    Storage:   12 logical bytes, 0 allocated bytes
    Type:      shared-1:1176 struct {
                   "vlstr"            +0    variable-length null-terminated 
ASCII string
               } 4 bytes
cmp_type                 Type
    Location:  1:1176
    Links:     2
    Type:      shared-1:1176 struct {
                   "vlstr"            +0    variable-length null-terminated 
ASCII string
               } 4 bytes
str_type                 Type
    Location:  1:800
    Links:     1
    Type:      shared-1:800 variable-length null-terminated ASCII string


When the second call to

if(H5Tcommitted(reopened_strtype) != 1) TEST_ERROR

is commented out, the infinite loop goes away.

Hopefully, you can fix your application since the member of the committed 
compound datatype cannot be a committed datatype (even it was created using a 
committed one), but we still have an issue in HDF5.

I confirmed that HDF5 1.8.* gives an infinite loop while HDF5 trunk is fine. It 
is not clear why the first H5committed call for the VL string type is not 
failing and why your test triggers an infinite loop.

For you information I entered JIRA issue HDFFV-9174.

Thanks again for your report!

Elena


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Elena Pourmal  The HDF Group  http://hdfgroup.org
1800 So. Oak St., Suite 203, Champaign IL 61820
217.531.6112
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




On Mar 17, 2015, at 1:09 AM, Hodson, Mark (Contractor) 
<[email protected]<mailto:[email protected]>> wrote:

<dtypes.c.patch>

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to