[BUG] Memory leak with scaleoffset


#1

Hello!

To reproduce:

  1. Compile and run attached
    test984i.c (1.3 KB)
    Memory usage grows unlimited, reaching 1GB in several seconds.

  2. Replace
    H5Pset_scaleoffset(dcpl, H5Z_SO_INT, 0)
    with
    H5Pset_scaleoffset(dcpl, H5Z_SO_INT, 1).
    Memory usage stands ~constant.

  3. Compile and run attached
    test984f.c (1.4 KB)
    Memory usage explodes quickly, reaching 1GB in several seconds.

  4. Replace
    H5Pset_scaleoffset(dcpl, H5Z_SO_FLOAT_DSCALE, 5)
    with
    H5Pset_scaleoffset(dcpl, H5Z_SO_FLOAT_DSCALE, 4).
    Memory usage keeps modest.

Originally reported in https://github.com/h5py/h5py/issues/984.

Best wishes,
Andrey Paramonov