diff options
author | Toomas Soome <tsoome@me.com> | 2019-01-21 20:03:20 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-06-25 23:14:04 +0300 |
commit | a6313a9d1cea800172e9672443e1496d90d4fbcf (patch) | |
tree | 47823b7bbf8c25b66c98a224a4b9037c41dfd6b4 | |
parent | eb633035c80613ec93d62f90482837adaaf21a0a (diff) | |
download | illumos-joyent-a6313a9d1cea800172e9672443e1496d90d4fbcf.tar.gz |
11119 libumem: NULL pointer errors
Reviewed by: John Levon <john.levon@joyent.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/lib/libumem/common/getpcstack.c | 4 | ||||
-rw-r--r-- | usr/src/lib/libumem/common/misc.c | 4 | ||||
-rw-r--r-- | usr/src/lib/libumem/common/umem_update_thread.c | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/usr/src/lib/libumem/common/getpcstack.c b/usr/src/lib/libumem/common/getpcstack.c index c2dd7f03f1..f8491edee1 100644 --- a/usr/src/lib/libumem/common/getpcstack.c +++ b/usr/src/lib/libumem/common/getpcstack.c @@ -25,8 +25,6 @@ * Copyright (c) 2016 by Delphix. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "misc.h" #include <ucontext.h> #include <sys/frame.h> @@ -149,7 +147,7 @@ getpcstack(uintptr_t *pcstack, int pcstack_limit, int check_signal) break; else if (nextfp <= minfp || (tmp - base) >= size) { #ifndef UMEM_STANDALONE - if (tmp == NULL || !on_altstack) + if (tmp == (uintptr_t)NULL || !on_altstack) break; /* * If we're on an alternate signal stack, try jumping diff --git a/usr/src/lib/libumem/common/misc.c b/usr/src/lib/libumem/common/misc.c index a3da9e5b05..6d809e19e0 100644 --- a/usr/src/lib/libumem/common/misc.c +++ b/usr/src/lib/libumem/common/misc.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <unistd.h> #include <dlfcn.h> #include <signal.h> @@ -244,7 +242,7 @@ print_sym(void *pointer) int result; Dl_info sym_info; - uintptr_t end = NULL; + uintptr_t end = (uintptr_t)NULL; Sym *ext_info = NULL; diff --git a/usr/src/lib/libumem/common/umem_update_thread.c b/usr/src/lib/libumem/common/umem_update_thread.c index 5b393cfb13..eb044b7641 100644 --- a/usr/src/lib/libumem/common/umem_update_thread.c +++ b/usr/src/lib/libumem/common/umem_update_thread.c @@ -138,7 +138,7 @@ umem_create_update_thread(void) (void) mutex_unlock(&umem_update_lock); - if (thr_create(NULL, NULL, umem_update_thread, NULL, + if (thr_create(NULL, 0, umem_update_thread, NULL, THR_BOUND | THR_DAEMON | THR_DETACHED | THR_SUSPENDED, &newthread) == 0) { (void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); |