summaryrefslogtreecommitdiffstats
path: root/src/H5HLcache.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-03-31 01:31:11 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-03-31 01:31:11 (GMT)
commit6e0d81dc8b65dc078fa31dae50acf96f3ce372e7 (patch)
tree588378063a4eae446ffe0c7e684f4e3aff6af358 /src/H5HLcache.c
parentfdbbe61bcf2c5bcbea8a4e08bd6ce8c62f7b43bc (diff)
parent799a732650735b8ad05a0398781d2a26ec47b288 (diff)
downloadhdf5-6e0d81dc8b65dc078fa31dae50acf96f3ce372e7.zip
hdf5-6e0d81dc8b65dc078fa31dae50acf96f3ce372e7.tar.gz
hdf5-6e0d81dc8b65dc078fa31dae50acf96f3ce372e7.tar.bz2
Merge pull request #1629 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:feature/json_vol to feature/json_vol
* commit '799a732650735b8ad05a0398781d2a26ec47b288': (185 commits) Updated the VOL struct. The json_vol test fails, though, because the plugin can't be found. Will diagnose later. Correct examples for packaging HDFFV-10738 Wrong INTENT for H5LTread_dataset_double_f Changes that show the right way to iterate over enums. Changes that show the right way to iterate over enums. Test improvement Description Moved the new tests to a more appropriate test function. Platforms tested: Linux/64 (jelly) Used the H5_INC_ENUM macro to squash enum value increment warnings. Fixed HDFFV-10210 and HDFFV-10587 Description: - Added parameter validation (HDFFV-10210) - Added detection of division by zero (HDFFV-10587 - CVE-2018-17438) - Fixed typos in various tests Platforms tested: Linux/64 (jelly) Linux/64 (platypus) Darwin (osx1011test) Fix CMake error in name Commented out memcpy overlap check while we investigate parallel filters issues. Yanked check for memcpy n > 0 - Added H5MMprivate.h #includes where needed - Added casts to quiet H5MM_memcpy warnings - Removed char * casts from HDmemcpy Added an H5MM_memcpy call that checks for buffer overlap. Added the HDopen work-around on windows to pio_engine.c Adds _wopen support on Windows so that files with UTF-8 names can be opened. CMake: fix pthread linking to only be private Add API routines to retrieve, restore, reset, and free library state. Added a note of bug fix for HDFFV-10705. Fixed the MANIFEST Fix issue with direct chunk write not updating the "last chunk" index cache. Fix issues involving datasets being "no allocated" when they contain cached raw data. ...
Diffstat (limited to 'src/H5HLcache.c')
-rw-r--r--src/H5HLcache.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 926f787..8b04b47 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -36,6 +36,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5HLpkg.h" /* Local Heaps */
#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
#include "H5WBprivate.h" /* Wrapped Buffers */
@@ -464,7 +465,7 @@ H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata,
image = ((const uint8_t *)_image) + heap->prfx_size;
/* Copy the heap data from the speculative read buffer */
- HDmemcpy(heap->dblk_image, image, heap->dblk_size);
+ H5MM_memcpy(heap->dblk_image, image, heap->dblk_size);
/* Build free list */
if(H5HL__fl_deserialize(heap) < 0)
@@ -587,7 +588,7 @@ H5HL__cache_prefix_serialize(const H5F_t *f, void *_image, size_t len,
heap->free_block = heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL;
/* Serialize the heap prefix */
- HDmemcpy(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC);
+ H5MM_memcpy(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC);
image += H5_SIZEOF_MAGIC;
*image++ = H5HL_VERSION;
*image++ = 0; /*reserved*/
@@ -615,7 +616,7 @@ H5HL__cache_prefix_serialize(const H5F_t *f, void *_image, size_t len,
H5HL__fl_serialize(heap);
/* Copy the heap data block into the cache image */
- HDmemcpy(image, heap->dblk_image, heap->dblk_size);
+ H5MM_memcpy(image, heap->dblk_image, heap->dblk_size);
/* Sanity check */
HDassert((size_t)(image - (uint8_t *)_image) + heap->dblk_size == len);
@@ -756,7 +757,7 @@ H5HL__cache_datablock_deserialize(const void *image, size_t len, void *_udata,
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate data block image buffer");
/* copy the datablock from the read buffer */
- HDmemcpy(heap->dblk_image, image, len);
+ H5MM_memcpy(heap->dblk_image, image, len);
/* Build free list */
if(FAIL == H5HL__fl_deserialize(heap))
@@ -851,7 +852,7 @@ H5HL__cache_datablock_serialize(const H5F_t *f, void *image, size_t len,
H5HL__fl_serialize(heap);
/* Copy the heap's data block into the cache's image */
- HDmemcpy(image, heap->dblk_image, heap->dblk_size);
+ H5MM_memcpy(image, heap->dblk_image, heap->dblk_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HL__cache_datablock_serialize() */