H5Ocopy may incorrectly copy datasets with variable-length datatype #3335
Labels
Component - C Library
Core C library issues (usually in the src directory)
Priority - 1. High 🔼
These are important issues that should be resolved in the next release
Type - Bug / Bugfix
Please report security issues to [email protected] instead of creating an issue on GitHub
Describe the bug
When copying a dataset with a variable-length datatype to a different file (such as when using
h5repack
), H5Ocopy does not currently account for the possibility of the global heap addresses involved changing between the two files. This can cause the copied datasets in the new file to become unreadable as HDF5 will attempt to read from global heap addresses that may not exist in the new file. Compiling and running the below program will generate a version 1.8 HDF5 file "test.h5" that should contain an unreadable dataset after being repacked with a version ofh5repack
prior to commit f5c3963.Expected behavior
H5Ocopy should be able to translate objects between the global heaps of two different files,
even when the global heap addresses involved aren't the same.
Platform (please complete the following information)
N/A
Additional context
https://forum.hdfgroup.org/t/segmentation-fault-when-using-h5repack-on-netcdf-4-file/11297
The text was updated successfully, but these errors were encountered: