[Crash-utility] Re: [PATCH] crash: fix the bug about the command kmem
anderson at prospeed.net
anderson at prospeed.net
Wed Jul 23 14:24:15 UTC 2008
>
> 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 at 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\n",
> --
> 1.5.3
>
>
>
>
> ------------------------------
Thanks for the patch -- I'll queue it for the next release.
It will be some time after August 4th -- I'm on vacation
and just happen to be borrowing somebody's laptop.
Dave Anderson (anderson at redhat.com)
More information about the Crash-utility
mailing list