libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libunwind] problem unwinding signal handler on HPUX


From: David Mosberger
Subject: Re: [libunwind] problem unwinding signal handler on HPUX
Date: Fri, 7 Nov 2003 11:37:08 -0800

>>>>> On Tue, 04 Nov 2003 19:06:02 -0500, Rob Faught <address@hidden> said:

  Rob> Hello David, It seems that the third argument to a signal
  Rob> handler is not a pointer to a full (48640 byte)
  Rob> ucontext_t. That is, sizeof(ucontext_t) is much larger than the
  Rob> data pushed on the stack. When ia64_uc_access_reg copies the
  Rob> ucontext its src pointer falls off the top of the stack with
  Rob> bad results. Instead grab the size field out of the ucontext_t
  Rob> and use that.

Something is fishy here.  ucontext_t is declared as:

typedef struct sigcontext mcontext_t;

typedef struct ucontext
  {
    union
      {
        mcontext_t _mc;
        struct
          {
            unsigned long _pad[_SC_GR0_OFFSET/8];
            struct ucontext *_link;     /* this should overlay sc_gr[0] */
          }
        _uc;
      }
    _u;
  }
ucontext_t;

so it is exactly as big as the "struct sigcontext" you get from the
kernel.  Can you provide a test-case that's failing for you?

        --david


reply via email to

[Prev in Thread] Current Thread [Next in Thread]