[Crash-utility] patch for command sig

Dave Anderson anderson at redhat.com
Fri Aug 25 13:32:03 UTC 2006


olivier.daudel at u-paris10.fr wrote:

> Hello Dave,
> This is a very small patch for command sig.
> I think it fixes the pointer problem.
>

I think it does too...   ;-)

I tested it with your procsig.c program, with additional
SIGUSR1 and SIGTERM signal-catchers to make sure they all
got referenced, and it works well:

  crash> for procsig sig
  PID: 4547   TASK: ffff8100366070c0  CPU: 1   COMMAND: "procsig"
  ...
  SIGQUEUE:  SIG      SIGINFO
              12  ffff81000397cab8
              10  ffff81000397c7d8
              15  ffff81000397c720
  crash>

Your fix is queued for the next release -- thanks!

Dave



> --- crash-4.0-3.2/task.c 2006-08-23 17:09:48.000000000 +0200
> +++ crash-4.0-3.2-patch/task.c 2006-08-25 00:03:48.000000000 +0200
> @@ -5751,7 +5751,7 @@
>   int translate, sig, sigpending;
>   uint ti_flags;
>   ulonglong sigset, blocked, mask;
> - ulong signal_struct, kaddr, handler, flags, sigqueue, next;
> + ulong signal_struct, kaddr, handler, flags, sigqueue, sigqueue_save, next;
>   ulong sighand_struct;
>   long size;
>   char *signal_buf, *uaddr;
> @@ -5932,7 +5932,7 @@
>                          mkstring(buf1, VADDR_PRLEN, CENTER|LJUST, "SIGINFO"));
>   else
>                  fprintf(fp, "SIGQUEUE: (empty)\n");
> -
> + sigqueue_save = sigqueue;
>          while (sigqueue) {
>           readmem(sigqueue, KVADDR, signal_buf,
> SIZE_OPTION(signal_queue, sigqueue), @@ -5949,7 +5949,8 @@
>                   sig = INT(signal_buf + OFFSET(sigqueue_info) +
> OFFSET(siginfo_si_signo));
>    }
> -
> +  if (sigqueue_save == next)
> +   break;
>                  fprintf(fp, "           %3d  %lx\n",
>                          sig, sigqueue +
>     OFFSET_OPTION(signal_queue_info, sigqueue_info));
>
> ----------------------------------------------------------------
> Ce message a ete envoye par IMP, grace a l'Universite Paris 10 Nanterre
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20060825/3155570a/attachment.htm>


More information about the Crash-utility mailing list