From: Randolph Chung <randolph@tausq.org>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] Latest 2.6.13-rc6-pa2 test pr :_(
Date: Sat, 27 Aug 2005 22:40:53 +0800 [thread overview]
Message-ID: <43107B75.80301@tausq.org> (raw)
In-Reply-To: <200508261342.j7QDgMCk015398@hiauly1.hia.nrc.ca>
> After another couple of hours of poking at this with gdb, I think
> we have a kernel bug. The saved r2 value in the signal context
> appears to contain the pc where the exception occurred instead of
> the r2 value when the exception occured. As a result, the unwind
> process goes into a loop when an exception occurs in a function
> which hasn't saved r2 in the frame.
I thought I could reproduce this, but I couldn't..... using the attached
program, the signal handler does see the correct (different) r2 and iaoq
in the signal frame. When compiled with -O2, bar() is a leaf function
with no frame, r2 in the signal handler points to the return point of
foo() inside of main().
Did I misunderstand the problem that you are describing? I am testing
with 2.6.13-rc6-pa2 64-bit.
randolph
#include <stdio.h>
#include <strings.h>
#include <signal.h>
#include <sys/ucontext.h>
void baz(void)
{
printf("in baz\n");
}
void sighandler(int sig, siginfo_t *info, void *data)
{
struct ucontext *ctx = (struct ucontext *)data;
struct sigcontext *mctx = &ctx->uc_mcontext;
printf("in sighandler\n");
printf("data=%p, r2 = %x, iaoq[0] = %x\n", data,
mctx->sc_gr[2], mctx->sc_iaoq[0]);
baz();
exit(0);
}
void bar(void)
{
int *x = 0;
int r2;
*x = 0;
}
void foo(void)
{
printf("in foo\n");
bar();
}
int main(int argc, char **argv)
{
struct sigaction sact;
memset(&sact, 0, sizeof(sact));
sact.sa_flags = SA_SIGINFO;
sact.sa_sigaction = sighandler;
sigaction(SIGSEGV, &sact, NULL);
foo();
return 0;
}
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
next parent reply other threads:[~2005-08-27 14:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200508261342.j7QDgMCk015398@hiauly1.hia.nrc.ca>
2005-08-27 14:40 ` Randolph Chung [this message]
2005-08-27 17:38 ` [parisc-linux] Latest 2.6.13-rc6-pa2 test pr :_( John David Anglin
2005-08-26 16:18 Joel Soete
[not found] <ILU3F9$C3BA108CF7E2FE4DECDD367F36FD15E5@scarlet.be>
2005-08-26 15:29 ` John David Anglin
[not found] <200508241530.j7OFUFwS005854@hiauly1.hia.nrc.ca>
2005-08-25 15:59 ` Randolph Chung
2005-08-25 17:04 ` John David Anglin
[not found] <4305FA88.9040404@tausq.org>
2005-08-19 18:41 ` John David Anglin
2005-08-20 17:51 ` John David Anglin
2005-08-21 14:37 ` Joel Soete
2005-08-21 15:47 ` John David Anglin
2005-08-21 15:53 ` Randolph Chung
2005-08-21 16:46 ` John David Anglin
-- strict thread matches above, loose matches on Subject: below --
2005-08-18 16:01 Joel Soete
2005-08-18 17:24 ` John David Anglin
2005-08-18 23:49 ` Randolph Chung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43107B75.80301@tausq.org \
--to=randolph@tausq.org \
--cc=dave@hiauly1.hia.nrc.ca \
--cc=parisc-linux@lists.parisc-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.