Subject: port-alpha/18113: unaligned access + segfault when compiling setjmp() with -pg on alpha
To: None <gnats-bugs@gnats.netbsd.org>
From: None <bryan-spamtrap4@darkforest.org>
List: netbsd-bugs
Date: 08/29/2002 23:57:53
>Number: 18113
>Category: port-alpha
>Synopsis: unaligned access + segfault when compiling setjmp() with -pg on alpha
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: port-alpha-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 29 23:58:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: B. James Phillippe
>Release: NetBSD 1.5.4_ALPHA
>Organization:
-bp
--
# bryan_at_darkforest_dot_org
# Software Engineer
>Environment:
System: NetBSD jupiter 1.5.4_ALPHA NetBSD 1.5.4_ALPHA (Jupiter 20020825) #5: Sun Aug 25 15:50:04 PDT 2002 bryan@jupiter:/usr/src/1.5/src/sys/arch/alpha/compile/jupiter alpha
Architecture: alpha
Machine: alpha
>Description:
Applications which make use of setjmp()/longjmp() cannot be
compiled with profiling (-pg) because they crash with an
unaligned access on entry of setjmp(). First observed this
in 1.5.2, am currently running clean 1.5.3 (with 1.5.4_ALPHA
kernel sources).
>How-To-Repeat:
/* Compile with: gcc -pg */
#include <setjmp.h>
jmp_buf env;
int foo(void)
{
int val;
if ((val = setjmp(env)) != 0) { /* <------ boom */
return val;
}
longjmp(env, 1);
return val;
}
int main(int argc, char *argv[])
{
foo();
return 0;
}
>Fix:
Poked around a little bit, but it's beyond me.
>Release-Note:
>Audit-Trail:
>Unformatted: