FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 07-21-2008, 09:02 AM
Wen Congyang
 
Default crash: fix the bug about the command kmem

Hi
When I use kmem command on an IA64 box with RHEL5.2 as following,
there are some errors.

crash> kmem -P e000000076c00000
Segmentation fault

The issue is that dump_mem_map() shouldn't be called when the address is a bad address.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>

---
memory.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/memory.c b/memory.c
index 912df04..f892391 100755
--- a/memory.c
+++ b/memory.c
@@ -10379,7 +10379,11 @@ kmem_search(struct meminfo *mi)
mem_map:
mi->flags = orig_flags;
pc->curcmd_flags &= ~HEADER_PRINTED;
- dump_mem_map(mi);
+ if (vaddr != BADADDR) {
+ dump_mem_map(mi);
+ } else {
+ mi->retval = FALSE;
+ }

if (!mi->retval)
fprintf(fp, "%llx: %s address not found in mem map
",
--
1.5.3


--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 06:45 PM.

VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org