diff options
| author | Jason Evans <jasone@canonware.com> | 2015-09-15 22:55:37 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2015-09-15 22:55:37 (GMT) |
| commit | 9898051fd16ebd5d29dc27aae5e069fe04486ff3 (patch) | |
| tree | adeab60b769c0dffa0782bd46eb60e741b4a2ff9 /test/unit/tsd.c | |
| parent | 6e98caf8f064482b9ab292ef3638dea67420bbc2 (diff) | |
| parent | 1d7540c9d71ee8a85ea97c9459698e090ee04719 (diff) | |
| download | jemalloc-4.0.1.zip jemalloc-4.0.1.tar.gz jemalloc-4.0.1.tar.bz2 | |
Merge branch 'dev'4.0.1
Diffstat (limited to 'test/unit/tsd.c')
| -rw-r--r-- | test/unit/tsd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/tsd.c b/test/unit/tsd.c index b031c48..8be787f 100644 --- a/test/unit/tsd.c +++ b/test/unit/tsd.c @@ -56,9 +56,14 @@ static void * thd_start(void *arg) { data_t d = (data_t)(uintptr_t)arg; + void *p; + assert_x_eq(*data_tsd_get(), DATA_INIT, "Initial tsd get should return initialization value"); + p = malloc(1); + assert_ptr_not_null(p, "Unexpected malloc() failure"); + data_tsd_set(&d); assert_x_eq(*data_tsd_get(), d, "After tsd set, tsd get should return value that was set"); @@ -67,6 +72,7 @@ thd_start(void *arg) assert_x_eq(*data_tsd_get(), (data_t)(uintptr_t)arg, "Resetting local data should have no effect on tsd"); + free(p); return (NULL); } |
