summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2005-01-06 21:16:16 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2005-01-06 21:16:16 (GMT)
commit9dba568fc3cc1cb69011a457b45f5683deb82016 (patch)
tree49536b8a1228ddd6e25b2a5d2c8432d4545b25ad
parent46bfff070f7b4c2056f116d56272121422424000 (diff)
downloadhdf5-9dba568fc3cc1cb69011a457b45f5683deb82016.zip
hdf5-9dba568fc3cc1cb69011a457b45f5683deb82016.tar.gz
hdf5-9dba568fc3cc1cb69011a457b45f5683deb82016.tar.bz2
[svn-r9761] Purpose:
Bug fix. Description: threadsafe test (ttsafe) would seg-fault if --disable-production --enable-debug mode is used. Reason was that the fstack.nused field was not initialized when created. Solution: Init new fstack.nused with 0. Platforms tested: Tested in mir, using development/debug mode. Did not "h5committested" as change is trivial and limited to threadsafe mode.
-rw-r--r--src/H5CS.c1
-rw-r--r--src/H5FS.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/H5CS.c b/src/H5CS.c
index 6543fc5..77bc3d7 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -87,6 +87,7 @@ H5FS_get_stack(void)
/* no associated value with current thread - create one */
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);
+ fstack->nused=0;
}
FUNC_LEAVE_NOAPI_NOFS(fstack);
diff --git a/src/H5FS.c b/src/H5FS.c
index 6543fc5..77bc3d7 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -87,6 +87,7 @@ H5FS_get_stack(void)
/* no associated value with current thread - create one */
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);
+ fstack->nused=0;
}
FUNC_LEAVE_NOAPI_NOFS(fstack);