summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
Commit message (Collapse)AuthorAgeFilesLines
* Made HGOTO_ERROR a do-while loop (#3308)Sean McBride2023-08-021-2/+2
| | | | | * Made HGOTO_ERROR a do-while loop
* Fixed more warnings about extra semicolons (#3249)Sean McBride2023-07-181-2/+2
| | | | | | | * Require semi-colon after H5_CHECK_OVERFLOW calls Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Remove HD from HDis* (e.g., isalpha) (#3212)Dana Robinson2023-06-291-50/+17
| | | | | | | | | | | | | * HDisalnum * HDisalpha * HDiscntrl * HDisdigit * HDisgraph * HDislower * HDisprint * HDispunct * HDisspace * HDisupper * HDisxdigit
* Remove HD from HDmem* calls (#3211)Dana Robinson2023-06-291-12/+0
|
* Remove HD from C std lib file ops (#3206)Dana Robinson2023-06-291-21/+0
| | | | | | | | | * HDfclose * HDferror * HDfeof * HDfflush * HDfopen * HDfread * HDfwrite
* Remove HD from strto* calls (#3204)Dana Robinson2023-06-291-18/+0
| | | | | | | | * HDstrtod * HDstrtol * HDstrtoll * HDstrtoul * HDstrtoull * HDstrtoumax
* Rename HDexit() and related to exit(), etc. (#3202)Dana Robinson2023-06-291-9/+0
| | | | | * HDatexit * HDexit * HD_exit
* Rename HDato*() to ato*() (#3201)Dana Robinson2023-06-291-12/+0
|
* Remove HD from protected POSIX calls (#3203)Dana Robinson2023-06-291-21/+0
| | | | | | | | | | | These calls are non-C99 but protected by ifdefs and have no Windows equivalents: * HDalarm * HDasprintf * HDclock_gettime * HDfcntl * HDgethostname * HDgetrusage * HDsymlink
* Remove HD from memory allocate/free calls (#3195)Dana Robinson2023-06-281-12/+0
| | | | | | * HDcalloc * HDfree * HDmalloc * HDrealloc
* Remove HD from HDposix_memalign() (#3196)Dana Robinson2023-06-281-3/+0
| | | | The posix_memalign call is only used in the direct VFD, which can only be built if posix_memalign() is available.
* Rename HDsystem() to system() (#3197)Dana Robinson2023-06-281-3/+0
| | | | system() is only used in the iopipe test and the things it calls (which are POSIX-y) are protected by an ifdef.
* Rename HD(f)printf() to (f)printf() (#3194)Dana Robinson2023-06-281-6/+0
|
* Rename HDassert() to assert() (#3191)Dana Robinson2023-06-281-14/+11
| | | | | * Change HDassert to assert * Fix bin/make_err
* Rename HDpipe() to pipe() (#3192)Dana Robinson2023-06-281-3/+0
| | | Pipe is POSIX but implemented in Microsoft's CRT
* Rename HDqsort() to qsort() (#3193)Dana Robinson2023-06-281-3/+0
| | | | | | | | | * Rename HDqsort() to qsort() * Committing clang-format changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Remove HD from fork/exec*/wait* (#3190)Dana Robinson2023-06-281-18/+0
| | | | These are not C99 but are hidden behind ifdefs and are highly unlikely to ever have non-POSIX equivalents.
* Remove HDva_(arg|copy|end|start) (#3184)Dana Robinson2023-06-281-12/+0
|
* Remove HD prefix from network calls (#3142)Dana Robinson2023-06-161-42/+0
| | | HDsocket(), etc. Only affects the mirror VFD and its test code.
* Many clang -Wextra-semi-stmt fixes (#2537)Sean McBride2023-06-161-2/+7
| | | | | * Adds semicolons to function-like macros * Adds a do..while(0) loop to some macros * Removes semicolons when inappropriate, especially H5E_TRY_BEGIN/END
* Remove unused HD macros (#3120)Dana Robinson2023-06-141-285/+0
| | | | | | | | | * Remove unused HD macros The library prefixes most C and POSIX API calls with 'HD'. We are going to start removing these so the code looks like normal C. This PR removes most of the unused HD markup macros. * Replace ntohl/ntohs
* Remove H5detect and H5make_libsettings (#3104)Dana Robinson2023-06-131-2/+3
| | | | | | | | Removes H5detect and H5make_libsettings from the build and replaces their functionality with things that don't affect cross-compiling. H5detect --> floating-point types are now detected on library load H5make_libsettings --> Moved functionality to a new H5build_settings.c template file
* Add netCDF and HDF-EOS5 badges to README.md (#3065)Dana Robinson2023-06-071-1/+1
|
* Move encode/decode macros to a new header (#3040)Dana Robinson2023-06-061-0/+3
| | | | | | | | | | | Moves the file-independent encode and decode macros to a new H5encode.h header that is itself included in H5private.h. Removes UINT64ENCODE_VARLEN and UINT64DECODE_VARLEN, which were unused. Fixes include statements in files where H5VMprivate.h and H5MMprivate.h were included via H5Fprivate.h.
* Convert H5F haddr_t macros to H5 (#3039)Dana Robinson2023-06-051-0/+29
| | | | | | | | | | | | | | | | | | | | | | Several macros for handling haddr_t values exist in H5Fprivate.h and have H5F prefixes, even though they have nothing to do with a particular file (e.g., H5F_addr_lt()). These macros have been moved to H5private.h and renamed to have an H5 prefix. Affected macros: H5F_addr_overflow H5F_addr_defined H5F_addr_eq H5F_addr_ne H5F_addr_lt H5F_addr_le H5F_addr_gt H5F_addr_ge H5F_addr_cmp H5F_addr_overlap H5F_addr_pow2 was unused and removed instead of converted.
* Prevent buffer overrun in H5S_select_deserialize (#2931)mattjala2023-05-121-0/+9
| | | | | | | | | | | | | | | | | | | | | * 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.
* Implement selection I/O with type conversion (#2823)Neil Fortner2023-04-281-8/+0
| | | | | Initial implementation of selection I/O with type conversion. Allows Parallel collective I/O with type conversion, as long as selection I/O is enabled.
* Removes programmer/date lines from src headers (#2747)Dana Robinson2023-04-181-16/+7
|
* Remove duplicated H5_IS_BUFFER_OVERFLOW macro (#2700)jhendersonHDF2023-04-121-5/+0
|
* Fix invalid memory access in H5O__ginfo_decode (#2663)mattjala2023-04-111-0/+5
|
* Add buffer overrun checks to H5O__layout_decode and H5O__sdspace_decode (#2679)jhendersonHDF2023-04-111-0/+5
| | | Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
* Fix minor things noted when doing 1.10 merges (#2610)Dana Robinson2023-03-241-1/+1
| | | | * Duplicated HDF_RESOURCES_DIR from cmake_ext_mod merge * Typos in comments
* Include shlwapi.h explicitly on Windows (#2407)Mark Kittisopikul2023-01-171-0/+1
| | | | | | | | * Include shlwapi.h explicitly * Add shlwapi library to LINK_LIB when header is detected Looking for StrStrIA in the shlwapi library is not reliable due to stdcall on mingw32.
* Removes MPE instrumentation support. (#2245)Dana Robinson2022-11-091-77/+4
| | | | | | | | | | | * Removes MPE instrumentation support. The Autotools will no longer accept --with-mpe= and the logging commands have been removed from the FUNC_ENTER macros. CMake has never supported instrumenting for MPE. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* H5O__pline_decode() Make more resilient to out-of-bounds read (#2210)Egbert Eich2022-11-091-0/+3
| | | | | | | | | | | | | Malformed hdf5 files may have trunkated content which does not match the expected size. When this function attempts to decode these it may read past the end of the allocated space leading to heap overflows as bounds checking is incomplete. Make sure each element is within bounds before reading. This fixes CVE-2019-8396 / HDFFV-10712 / github bug #2209. Signed-off-by: Egbert Eich <eich@suse.com> Signed-off-by: Egbert Eich <eich@suse.com>
* Removes dmalloc support (#2239)Dana Robinson2022-11-091-7/+0
| | | | | | | | | | This has not been used to debug the library in a very long time. Most developers use valgrind, -fsanitize=address, or some other memory checker instead of this library. This removes: * dmalloc.h include from H5private.h * --with-dmalloc= Autotools configure option * HDF5_ENABLE_USING_DMALLOC CMake option
* Update copyright headers (#2184)Larry Knox2022-11-011-1/+0
| | | | | * Updated source file copyright headers to remove "Copyright by the Board of Trustees of the University of Illinois", which is kept in the top-level COPYING file.
* Multi Dataset (#2120)Neil Fortner2022-10-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix bug with cross platform compatibility of references within vlens. No testing yet. * Merge from multi_rd_wd_coll_io to a more recent branch from develop. Untested, probably does not work yet. * Committing clang-format changes * Committing clang-format changes * Fix many bugs in multi dataset branch. Mostly works, some issues in SWMR tests. * Committing clang-format changes * Disable test in swmr.c that was failing due to bug in HDF5 unrelated to multi dataset. * Committing clang-format changes * Fixed fortran multi-dataset tests * Fixed xlf errors * Added benchmark code for multi-datasets * loops over datasets * added missing error arg. * Added gnuplot formatting * Jonathan Kim original MD benchmarking code * updated MD benchmarking code * code clean-up * Only make files in feature test mode * misc clean-up * removed TEST_MDSET_NO_LAST_DSET_2ND_PROC option * Committing clang-format changes * Change multi dataset API to use arrays of individual parameters instead of the parameter struct. * Committing clang-format changes * Update to new multi dataset Fortran API and tests. (#1724) * Update to new multi dataset Fortran API and tests. * Sync Fortran with develop. * skipping h5pget_mpio_actual_io_mode_f for now * Fixed issue with dxpl_id, changed to variable size dim. (#1770) * Remove "is_coll_broken" field from H5D_io_info_t struct * Committing clang-format changes * Minor cleanup in multi dataset code. * Committing clang-format changes * Clean up in multi dataset code. * Committing clang-format changes * Committing clang-format changes * Fix speeling * Fix bug in parallel compression. Switch base_maddr in io_info to be a union. * Committing clang-format changes * Implement selection I/O support with multi dataset. Will be broken in parallel until PR 1803 is merged to develop then the MDS branch. * Committing clang-format changes * Spelling * Fix bug in multi dataset that could cause errors when only some of the datasets in the multi dataset I/O used type conversion. * Committing clang-format changes * Integrate multi dataset APIs with VOL layer. Add async versions of multi dataset APIs. * Committing clang-format changes * Spelling fixes * Fix bug in non-parallel HDF5 compilation. * Committing clang-format changes * Fix potential memory/free list error. Minor performance fix. Other minor changes. * Committing clang-format changes * Fix memory leak with memory dataspace for I/O. * Committing clang-format changes * Fix stack variables too large. Rename H5D_dset_info_t to H5D_dset_io_info_t. * Committing clang-format changes * Remove mem_space_alloc field from H5D_dset_io_info_t. Each function is now responsible for freeing any spaces it adds to dset_info. * Committing clang-format changes * fixed _multi Fortran declaration * Refactor various things in (mostly) the serial I/O code path to make things more maintainable. * Committing clang-format changes * updated to array based, doxygen, and examples * Reinstate H5D_chunk_map_t, stored (via pointer) inside H5D_dset_io_info_t. * Change from calloc to malloc for H5D_dset_io_info_t and H5D_chunk_map_t. Switch temporary dset_infos to be local stack variables. * Committing clang-format changes * format cleanup * format cleanup * added coll and ind * Modify all parallel I/O paths to take dset_info instead of assuming dset_info[0]. * Committing clang-format changes * fixed output * Rework parallel I/O code to work properly with multi dataset in more cases. Fix bug in parallel compression. * Committing clang-format changes * Prevent H5D__multi_chunk_collective_io() from messing up collective opt property for other datasets in I/O. Other minor cleanup. Add new test case to t_pmulti_dset.c for H5FD_MPIO_INDIVIDUAL_IO, disabled for now due to failures apparently unrelated to multi dataset code. * Fix spelling * Committing clang-format changes * Replace N log N algorithm for finding chunk in H5D__multi_chunk_collective_io() with O(N) algorithm, and remove use of io_info->sel_pieces in that function. * Committing clang-format changes * Replace sel_pieces skiplist in io_info with flat array of pointers, use qsort in I/O routine only when necessary. * Committing clang-format changes * Add new test case to mdset.c * Committing clang-format changes * Fix spelling * Very minor fix in H5VL__native_dataset_read() * Fix bug that could affect filtered parallel multi-dataset I/O. * Add RM entries for H5Dread_multi(), H5Dread_multi_async(), H5Dwrite_multi(), and H5Dwrite_multi_async() * Unskip test in swmr.c * Committing clang-format changes * Eliminate H5D__pre_read and H5D__pre_write * Remove examples/ph5mdsettest.c. Will fix and re-add as a test. * Enable hyperslab combinations in mdset test * Committing clang-format changes * Clarify H5Dread/write_multi documentation. * Fix bugs in multi-dataset I/O. Expand serial multi dataset test. Update macro in parallel multi dataset test. * Committing clang-format changes * Spelling * Remove obsolete entry in bin/trace * Rework type conversion buffer allocation. Only one buffer is shared between datasets in mdset mode, and it is malloced instead of calloced. * Committing clang-format changes * Fix bug in error handling in H5D__read/write * added multi-dataset fortran check with optional dataset creation id (#2150) * removed dup. dll entry * Address comments from code review. * Remove spurious changes in H5Fmpi.c * Fix issue with reading unallocated datasets in multi-dataset mode. Address other comments from code review. * Committing clang-format changes * Delay chunk index lookup from io_init to mdio_init so it doesn't add overhead to single dataset I/O. * Committing clang-format changes * Fix inappropriate use of piece_count * updated copyright on new file, removed benchmark from testing dir. Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: M. Scot Breitenfeld <brtnfld@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
* Use case-insensitive comparison for headers fix #2100 (#2101)Frank Berghaus2022-09-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use case-inseneitive comparison for headers HTTP headers should be case-insensitive. Use case-insensitive string comparisons when working with HTTP header responses to ensure compatibility. * Revert "Use case-inseneitive comparison for headers" This reverts commit a02f591723506b62b7208449be6eef7122120398 * Ignore case when searching HTTP header responses Looking up the Content-Length in the header returned by S3 storage endpoints should ignore case. To guarantee portability implement a function for case-insensitive string search, because it is non-standard. * Add an _ after H5 for the strcasestr implementation It is a private function and should sport that underscore. * Remove author comment from the doc comment * Use search function defined by system if available Check whether the system provides a function implementing case insensitive string searches. Only use the custom implementation if the system does not provide the functionality. * Add tests for case-insensitive search Basic tests: - Search for empty string - Search with exact match - Search with case-insensitive match - search with no match * Enforce clang-format style Some variable definitions in the th5_system tests did not conform to clang-format's expectations. Updated the offending lines. * Correct comment describing test case * Added some spaces to please clang-format * Ignore discarding const Ask the compiler to ignore discarding the const when retunring a match from H5_strcasestr Co-authored-by: Frank Berghaus <frank.berghaus@mpcdf.mpg.de>
* Fix typos found in src/ subdirectory (#1983)luzpaz2022-08-101-1/+1
| | | Found via `codespell -q 3 -S ./release_docs,./bin/trace,./hl/tools/h5watch/h5watch.c,./tools/test/h5jam/tellub.c -L isnt,inout,nd,parms,parm,ba,offsetP,ser,ois,had,fiter,fo,clude,refere,minnum,offsetp,creat,ans:,eiter,lastr,ans,isn\'t,ifset,sur,trun,dne,tthe,hda,filname,te,htmp,minnum,ake,gord,numer,ro,oce`
* Turns off clang optimizations on a couple of onion VFD functions (#1976)Dana Robinson2022-08-081-0/+13
| | | Ancient clang (7.7.3 on OS X) emits problematic code with -O2 or -O3
* Adds platform-independent basename and dirname (#1951)Dana Robinson2022-08-051-0/+5
| | | | | | | | | | | | | | | | | | | | * Adds platform-independent basename and dirname * Tidy up H5_dirname and H5_basename implementations and add tests * Committing clang-format changes * Fix misspelling * Several fixes for H5_dirname/H5_basename from review * Committing clang-format changes * Add reason to VERIFY_STR macros in th5_system.c * Use H5MM_free instead of HDfree in H5_dirname/H5_basename tests Co-authored-by: Jordan Henderson <jhenderson@hdfgroup.org> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Onion VFD (#1953)Dana Robinson2022-08-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Onion VFD feature * Fixes onion VFD errors with non-sec2 backing store VFDs * Disables the onion VFD tests w/ ph5diff * Disables non-sec2 VFDs as onion VFD backing stores * Committing clang-format changes * Formatted source * Typo * Adds onion VFD tools tests to CMake * Fixes for v16 API compatibility * Memset structs to avoid bad frees on errors * H5Dwrite() calls now use H5T_NATIVE_INT as the memory type vs LE * Properly decodes checksums on BE machines * Be more careful about uint64_t to haddr_t/hsize_t conversions * Another fix for BE data comparison * Removed double underscores from onion constants * Replace hard-coded onion header string w/ constant * Fixes cleanup paths in H5FD__onion_ingest_history() * Fixed use of size_t revision numbers * Fix h5dump revision count format string Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Removes Windows getlogin() equivalents (#1958)Dana Robinson2022-08-011-3/+0
| | | This function is no longer used in the library
* Develop clang 13 format (#1933)Allen Byrne2022-07-261-6/+6
| | | | | * Update format source to clang 13 * More format changes
* Updates uthash and makes some tweaks (#1928)Dana Robinson2022-07-251-0/+1
| | | | | | | | | | | * Updates uthash from 2.1.0 to 2.3.0 * Moves uthash include and related to H5private.h * Defines HASH_NONFATAL_OOM so that out-of-memory doesn't abort() * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Switches the tagged metadata list from a skip list to a hash table (#1925)Dana Robinson2022-07-251-0/+9
|
* Removes definitions for (U)LLONG_MAX and (S)SIZET_MAX (#1877)Dana Robinson2022-07-111-14/+7
| | | | | | | LLONG_MAX and ULLONG_MAX are defined in limits.h in C99. SIZET_MAX should be SIZE_MAX, which has been around forever. SSIZET_MAX should be SSIZE_MAX, which is defined whereever ssize_t is found. I've kept the definition for SSIZE_MAX (renamed from SSIZET_MAX) for platforms where ssize_T is not present (e.g., Windows).
* Support for UnifyFS with MPI_File_sync (#1801)Houjun Tang2022-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * Initial implementation for supporting UnifyFS in HDF5 with MPI_File_sync after write * Committing clang-format changes * Fix format * Fix env variable and return value check * Fix flag retrieve * Fix issues with getting/setting the flag * Fix merge conflicts * Update * Committing clang-format changes * Update based on suggestions * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Adds the malloc attribute to appropriate functions (gcc only) (#1866)Dana Robinson2022-07-111-43/+59
|