HDFGroup / vol-rest

HDF5 REST VOL Connector
Other
5 stars 8 forks source link

Fix segfault on VOL termination #100

Closed mattjala closed 11 months ago

mattjala commented 11 months ago

Sometimes the global type array RV_type_info_array_g can have a NULL value, and if it did, the VOL termination would attempt to dereference a NULL pointer while freeing it. It now checks that the array exists before trying to free it.

I'm not exactly sure what factors cause the array to be NULL - it's declared in rest_vol.h, defined in rest_vol.c, and never explicitly set to NULL. This issue didn't come up with the dynamically linked or manually linked tests on their own - it only cropped up when using the manually linked tests (test_rest_vol) when they were built under the library with fetch content, and when running them through the autotools-generated script.

jhendersonHDF commented 11 months ago

The failures in the fetchcontent actions can be ignored, as they're a commit behind due to the nature of fetching the current HEAD commit of the upstream repo rather than working from the commit in the PR. We should probably have the fetchcontent actions be a separate daily action, or remove them from this repo's CI testing as I'm testing them elsewhere now and they'll soon be in a daily build in the HDF5 repo.