diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-01-26 21:26:12 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-01-26 21:26:12 (GMT) |
commit | 8bbdc947c4f92fc9b1711adc0b00337dae2ed666 (patch) | |
tree | 4f5f3edadeece803b46ed1c3a84f11a7d266e9ec /src/H5B.c | |
parent | 8aa7c27fb717f481d924ea5f7793b10f35c29947 (diff) | |
download | hdf5-8bbdc947c4f92fc9b1711adc0b00337dae2ed666.zip hdf5-8bbdc947c4f92fc9b1711adc0b00337dae2ed666.tar.gz hdf5-8bbdc947c4f92fc9b1711adc0b00337dae2ed666.tar.bz2 |
[svn-r28972] Removed option to clear file buffers from autotools, CMake, and library.
Buffers that will be written to disk will now always be cleared since
not doing this has huge security implications.
Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0, x86_64) gcc 5.2.1
serial autotools
parallel autotools (MPICH 3.1.4)
serial CMake
Diffstat (limited to 'src/H5B.c')
-rw-r--r-- | src/H5B.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -1731,14 +1731,13 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey) (shared->two_k + 1) * shared->sizeof_rkey); /*keys */ HDassert(shared->sizeof_rnode); - /* Allocate shared buffers */ + /* Allocate and clear shared buffers */ if(NULL == (shared->page = H5FL_BLK_MALLOC(page, shared->sizeof_rnode))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree page") -#ifdef H5_CLEAR_MEMORY -HDmemset(shared->page, 0, shared->sizeof_rnode); -#endif /* H5_CLEAR_MEMORY */ + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree page") + HDmemset(shared->page, 0, shared->sizeof_rnode); + if(NULL == (shared->nkey = H5FL_SEQ_MALLOC(size_t, (size_t)(shared->two_k + 1)))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree native keys") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree native keys") /* Initialize the offsets into the native key buffer */ for(u = 0; u < (shared->two_k + 1); u++) |