NetBSD Problem Report #18113

Received: (qmail 3034 invoked by uid 605); 30 Aug 2002 06:57:58 -0000
Message-Id: <200208300657.g7U6vrd28775@darkforest.org>
Date: Thu, 29 Aug 2002 23:57:53 -0700 (PDT)
From: bryan-spamtrap4@darkforest.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: bryan-spamtrap4@darkforest.org
To: gnats-bugs@gnats.netbsd.org
Subject: unaligned access + segfault when compiling setjmp() with -pg on alpha
X-Send-Pr-Version: 3.95

>Number:         18113
>Category:       port-alpha
>Synopsis:       fixed but let's add a test: setjmp() with -pg on alpha crashes
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    thorpej
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 30 06:58:00 +0000 2002
>Closed-Date:    
>Last-Modified:  Tue Oct 13 15:44:01 +0000 2020
>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:
State-Changed-From-To: open->analyzed
State-Changed-By: drochner@netbsd.org
State-Changed-When: Thu, 31 Mar 2005 17:27:50 +0000
State-Changed-Why:
problem is understood


State-Changed-From-To: analyzed->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 13 Jul 2014 04:57:02 +0000
State-Changed-Why:
Is this still a problem? (has updating the compiler changed it?)

...if not, if the problem is still understood please post the info in
the PR, as otherwise people lose track or just plain forget.


From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-alpha/18113 (unaligned access + segfault when compiling setjmp() with -pg on alpha)
Date: Sun, 13 Jul 2014 15:40:26 +0200

 The test program from the PR works fine (no core) on -current for me.
 We should add a -pg compiled version of src/tests/lib/libc/setjmp/t_setjmp.c
 to the test suite though.

 Martin

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 22 Jul 2014 05:11:28 +0000
State-Changed-Why:
we have feedback.

Adding a test is a good idea, let's do that. Someone(TM) is on call!


Responsible-Changed-From-To: port-alpha-maintainer->thorpej
Responsible-Changed-By: thorpej@NetBSD.org
Responsible-Changed-When: Tue, 13 Oct 2020 15:44:01 +0000
Responsible-Changed-Why:
Take.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: gnats-precook-prs,v 1.4 2018/12/21 14:20:20 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.