diff options
author | Jeremy Jones <jeremy@delphix.com> | 2013-05-17 11:06:02 -0800 |
---|---|---|
committer | Christopher Siden <chris.siden@delphix.com> | 2013-05-17 12:06:02 -0700 |
commit | 982e63f0dc541ca7cc5d69cf6504d5218a48434d (patch) | |
tree | 1f8377b016a9448728ee99f5ae41ef9ab9f1ec56 | |
parent | 3197aa64bfc2eb6662d48b7c4cb38cabbe816d2e (diff) | |
download | illumos-joyent-982e63f0dc541ca7cc5d69cf6504d5218a48434d.tar.gz |
3771 kmdb hangs when reading an invalid address
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Reviewed by: Jeff Biseda <jbiseda@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
-rw-r--r-- | usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c b/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c index 761b448f4f..c14261f0ae 100644 --- a/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c +++ b/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include <kmdb/kmdb_kvm.h> @@ -137,7 +138,12 @@ ssize_t kmt_rw(mdb_tgt_t *t, void *buf, size_t nbytes, uint64_t addr, ssize_t (*rw)(void *, size_t, uint64_t)) { - size_t n, ndone, chunksz; + /* + * chunksz needs to be volatile because of the use of setjmp() in this + * function. + */ + volatile size_t chunksz; + size_t n, ndone; jmp_buf *oldpcb = NULL; jmp_buf pcb; ssize_t res; |