summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-11-13 18:15:42 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-11-13 18:15:42 (GMT)
commit42eb9ee55fd306fb14aad149420787a9aafe3d83 (patch)
tree49530584f40bb5703c65d30d7fd972dce9c219b9
parent898ba82d42aa46cbca59fca31f47d5bce3e8dd72 (diff)
downloadhdf5-42eb9ee55fd306fb14aad149420787a9aafe3d83.zip
hdf5-42eb9ee55fd306fb14aad149420787a9aafe3d83.tar.gz
hdf5-42eb9ee55fd306fb14aad149420787a9aafe3d83.tar.bz2
[svn-r7846] Purpose:
Bug fix. Description: The new routines added for H5MM_[m|c]alloc were causing the function stack code to infinitely recurse while allocating room for the thread-specific information (when thread-safety was turned on). Solution: Call HDmalloc directly instead of H5MM_malloc Platforms tested: FreeBSD 4.9 (sleipnir) Changed are not tested in h5committest
-rw-r--r--src/H5FS.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/H5FS.c b/src/H5FS.c
index 9ec80de..0c02034 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -27,7 +27,6 @@
*/
#include "H5private.h" /* Generic Functions */
#include "H5FSprivate.h" /* Private function stack routines */
-#include "H5MMprivate.h" /* Memory management functions */
#ifdef H5_HAVE_FUNCSTACK
@@ -86,7 +85,7 @@ H5FS_get_stack(void)
fstack = pthread_getspecific(H5TS_funcstk_key_g);
if (!fstack) {
/* no associated value with current thread - create one */
- fstack = (H5FS_t *)H5MM_malloc(sizeof(H5FS_t));
+ fstack = (H5FS_t *)HDmalloc(sizeof(H5FS_t)); /* Don't use H5MM_malloc() here, it causes infinite recursion */
pthread_setspecific(H5TS_funcstk_key_g, (void *)fstack);
}