-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hdffv 11052 #2315
Merged
Merged
Hdffv 11052 #2315
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… producing a core dump. When h5debug closes the corrupted file, the library calls H5F__dest() which performs all the closing operations for the file "f" (H5F_t *) but just keeping note of errors in "ret_value" all the way till the end of the routine. The user-provided corrupted file has an illegal file size causing failure when reading the image during the closing process. At the end of this routine it sets f->shared to NULL and then frees "f". This is done whether there is error or not in "ret_value". Due to the failure in reading the file earlier, the routine then returns error. The error return from H5F__dest() causes the file object "f" not being removed from the ID node table. When the library finally exits, it will try to close the file objects in the table. This causes assert failure when H5F_ID_EXISTS(f) or H5F_NREFS(f). Fix: a) H5F_dest(): free the f only when there is no error in "ret_value" at the end of the routine. b) H5VL__native_file_close(): if f->shared is NULL, free "f"; otherwise, perform closing on "f" as before. c) h5debug.c main(): track error return from H5Fclose().
…into HDFFV-11052
…s using a pre-generated file.
vchoi-hdfgroup
requested review from
lrknox,
derobins,
byrnHDF,
fortnern,
jhendersonHDF,
qkoziol,
bmribler and
raylu-hdf
as code owners
December 16, 2022 19:09
byrnHDF
approved these changes
Dec 16, 2022
derobins
approved these changes
Dec 16, 2022
derobins
added a commit
to derobins/hdf5
that referenced
this pull request
Dec 20, 2022
b9244a8 Align arg types of H5D_chunk_iter_op_t with H5Dget_chunk_info (HDFGroup#2074) 70cf2c3 Removed idioms and misc. text clean-up (HDFGroup#2320) 8102fa8 Only document Fortran functions (HDFGroup#2319) 784061b moved onion VFD to FAPL group (HDFGroup#2321) 6b6bcde Hdffv 11052 (HDFGroup#2315) 10c693a Update hdf5_header.html 0cb5808 Hdffv 11052 (HDFGroup#2303) a1c81ed added doc. warning for H5Literate_async return value (HDFGroup#2295) 502b32b Updated H5ES documenation (HDFGroup#2293) a903600 Fix for HDFFV-11052: h5debug fails on a corrupted file (h5_nrefs_POC)… (HDFGroup#2291)
derobins
added a commit
to derobins/hdf5
that referenced
this pull request
Dec 20, 2022
b9244a8 Align arg types of H5D_chunk_iter_op_t with H5Dget_chunk_info (HDFGroup#2074) 70cf2c3 Removed idioms and misc. text clean-up (HDFGroup#2320) 8102fa8 Only document Fortran functions (HDFGroup#2319) 784061b moved onion VFD to FAPL group (HDFGroup#2321) 6b6bcde Hdffv 11052 (HDFGroup#2315) 10c693a Update hdf5_header.html 0cb5808 Hdffv 11052 (HDFGroup#2303) a1c81ed added doc. warning for H5Literate_async return value (HDFGroup#2295) 502b32b Updated H5ES documenation (HDFGroup#2293) a903600 Fix for HDFFV-11052: h5debug fails on a corrupted file (h5_nrefs_POC)… (HDFGroup#2291)
derobins
added a commit
that referenced
this pull request
Dec 21, 2022
b9244a8 Align arg types of H5D_chunk_iter_op_t with H5Dget_chunk_info (#2074) 70cf2c3 Removed idioms and misc. text clean-up (#2320) 8102fa8 Only document Fortran functions (#2319) 784061b moved onion VFD to FAPL group (#2321) 6b6bcde Hdffv 11052 (#2315) 10c693a Update hdf5_header.html 0cb5808 Hdffv 11052 (#2303) a1c81ed added doc. warning for H5Literate_async return value (#2295) 502b32b Updated H5ES documenation (#2293) a903600 Fix for HDFFV-11052: h5debug fails on a corrupted file (h5_nrefs_POC)… (#2291)
derobins
added a commit
that referenced
this pull request
Dec 21, 2022
* Brings the following changesets over from develop: b9244a8 Align arg types of H5D_chunk_iter_op_t with H5Dget_chunk_info (#2074) 70cf2c3 Removed idioms and misc. text clean-up (#2320) 8102fa8 Only document Fortran functions (#2319) 784061b moved onion VFD to FAPL group (#2321) 6b6bcde Hdffv 11052 (#2315) 10c693a Update hdf5_header.html 0cb5808 Hdffv 11052 (#2303) a1c81ed added doc. warning for H5Literate_async return value (#2295) 502b32b Updated H5ES documenation (#2293) a903600 Fix for HDFFV-11052: h5debug fails on a corrupted file (h5_nrefs_POC)… (#2291) * Brings the following changes over from develop: c1e44d3 Fix doxygen warnings and remove javadocs (#2324) 149b8e9 Disable hl tools by default (#2313)
brtnfld
pushed a commit
to brtnfld/hdf5
that referenced
this pull request
May 17, 2023
* Fix for HDFFV-11052: h5debug fails on a corrupted file (h5_nrefs_POC) producing a core dump. When h5debug closes the corrupted file, the library calls H5F__dest() which performs all the closing operations for the file "f" (H5F_t *) but just keeping note of errors in "ret_value" all the way till the end of the routine. The user-provided corrupted file has an illegal file size causing failure when reading the image during the closing process. At the end of this routine it sets f->shared to NULL and then frees "f". This is done whether there is error or not in "ret_value". Due to the failure in reading the file earlier, the routine then returns error. The error return from H5F__dest() causes the file object "f" not being removed from the ID node table. When the library finally exits, it will try to close the file objects in the table. This causes assert failure when H5F_ID_EXISTS(f) or H5F_NREFS(f). Fix: a) H5F_dest(): free the f only when there is no error in "ret_value" at the end of the routine. b) H5VL__native_file_close(): if f->shared is NULL, free "f"; otherwise, perform closing on "f" as before. c) h5debug.c main(): track error return from H5Fclose(). * Committing clang-format changes * Add test and release note info for fix to HDFFV-11052 which is merged via PR#2291. * Committing clang-format changes * Add the test file to Cmake. * Skip test_misc37() for drivers that is not default compatible as it is using a pre-generated file. * Committing clang-format changes Co-authored-by: vchoi <[email protected]> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.