Skip to content
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

Fixes failures with gfortran 4.8 #2979

Merged
merged 233 commits into from
May 18, 2023
Merged

Fixes failures with gfortran 4.8 #2979

merged 233 commits into from
May 18, 2023

Conversation

brtnfld
Copy link
Contributor

@brtnfld brtnfld commented May 18, 2023

Discovered with DT on echidna.

brtnfld and others added 30 commits December 8, 2022 17:30
HDFGroup#2291)

* 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

Co-authored-by: vchoi <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Update windows worker compilers

* Update bin and test issues

* Update script and revert java test
* Adds 'unused' hints for MDS io_info parameters

* Committing clang-format changes

* Fix issue with formatter

* Committing clang-format changes

* Final fix for formatter

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* 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.

Co-authored-by: vchoi <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Use less awkward language.
…oup#2308)

* Converts the YAML build mode arrays to objects in special runs

* Adds a dump of the matrix context for each test

This would have made it a LOT easier to debug the build_mode issues...

* Disable the mirror VFD in the -Werror checks

We can re-enable this after we fix the warnings, but I don't want to
conflate code and GitHub changes, so this is a better way to get the
CI to pass for now.
* 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>
* Only document Fortran functions

* Only document Fortran functions

* Only document Fortran functions

* Only document Fortran functions
* Disable hl tools by default

* identify the tools

* Only GIF tools are depecated

* Add new option

* Update autotools
* removed idioms and misc. text clean-up, Issue HDFGroup#2135

* removed idioms and misc. text clean-up, Issue HDFGroup#2135
…up#2074)

* Align arg types of H5D_chunk_iter_op_t with H5Dget_chunk_info

* Modify chunk_info test to for unsigned / hsize_t types

* Fix types in test
* Fix doxygen warnings and remove javadocs

* fix typo
* Fix up the H5Pencode2 test for virtual layout.

* Committing clang-format changes

* Remove VERIFY and use TEST_ERROR.

Co-authored-by: vchoi <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* H5F_LIBVER_LATEST changes for move to 1.15

* Add new default api check

* Format fixes

* Fix default configure

* fix lib version tests

* Fix another version variable

* Add 1.14 doc link
* Partial work towards cleaning up the onion VFD code

* Committing clang-format changes

* A few minor tweaks to the onion VFD public header

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Initial doxygen markup

* Committing clang-format changes

* Adds Doxygen comments to VOL flags

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Update testh5cc.sh.in for new major version 1.14.

* iFix sha256sum commands in release script.
* Fixes the broken Autotools option
* Removes the "build HL tools" option
* Fix for Autotools --disable-deprecated-symbols

When we added v116 as a valid option, we left the default as v114 so
using --disable-deprecated-symbols leads configure to complain that you
can't set a default API that was deprecated.

The GitHub action didn't catch this because it explicitly specifies v116

This only affects develop w/ the Autotools when
--disable-deprecated-symbols is requested.

* Added v116 & default to the --with-default-api-version help string

The Autotools --with-default-api-version help string was missing v116.
This has been added, as well as a "default" target so the CI can catch
version problems when we forget to update the defaults upon creating
a new major version.

The GitHub CI also now uses "default" as the target for the deprecated
symbols build.

* Fixes the 1.14 API GitHub CI threadsafe/build_mode

This action still had the bug we fixed where we set the build mode
and threadsafety using an array of size one instead of an object.
* Adds missing Doxygen for H5ESpublic.h

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
derobins and others added 22 commits May 17, 2023 14:12
Removes unnecessary headers and adds missing headers, ensuring
that headers can be included independently and in any order.

Fixes HDFGroup#2789
* Reduce code duplication in macros

Signed-off-by: Quincey Koziol <[email protected]>

* "insert" -> "remove" in error string

Signed-off-by: Quincey Koziol <[email protected]>

* Remove unused macro also

Signed-off-by: Quincey Koziol <[email protected]>

---------

Signed-off-by: Quincey Koziol <[email protected]>
Signed-off-by: Quincey Koziol <[email protected]>
* Add failure value where it's missing from 1+ macros.  Clean up
whitespace / continuation characters ('\').  Made hash-table macros generic
for use in both the package header and test header.  Remove duplicated
copy & pasted macros (by hoisting difference into #ifdef'd macro).
Updated and re-flowed comments to read better.

Also clean up a few compiler warnings in production builds.

Signed-off-by: Quincey Koziol <[email protected]>

* Committing clang-format changes

* Remove unused variable warning in H5C.c (HDFGroup#2844)

* Remove trailing /* NDEBUG */ comment from #endif's

* Committing clang-format changes

---------

Signed-off-by: Quincey Koziol <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Required for building with Intel's oneAPI
* Move functions into more focused source code modules, along with a small #
of directly secondary effects.  No actual changes to the contents of any
moved routines.

Signed-off-by: Quincey Koziol <[email protected]>

* Committing clang-format changes

---------

Signed-off-by: Quincey Koziol <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Prevent buffer overrun in H5S_select_deserialize

The call to H5S_select_deserialize from H5S_decode doesn't have
the buffer size available to it, so to allow decoding there
I set it to assume a max size buffer for now.

Making the buffer size known in H5S_decode could be done by
modifying the external API's H5Sdecode, or splitting H5Sdecode
into two functions using a macro (similar to H5Sencode), with the
macro taking one argument and assuming a max buffer size.

* Conditional buffer check in H5S_select_deserialize

Moved and renamed a macro for only checking buffer overflow when
buffer size is known from H5Odtype.c to H5private.h,
so it can be used throughout the library.

Also silenced some build warnings about types.
* Remove unnecessary 'magic' field from cache structs

Signed-off-by: Quincey Koziol <[email protected]>

* Committing clang-format changes

---------

Signed-off-by: Quincey Koziol <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Changed to INTENT(IN) for C_PTR dummy args since it refers to whether C_PTR can be changed and does not relate to the INTENT state of the target.
@brtnfld brtnfld requested review from derobins and epourmal as code owners May 18, 2023 19:02
@lrknox lrknox merged commit 4829208 into HDFGroup:develop May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.