NetBSD Problem Report #59305
From www@netbsd.org Thu Apr 17 05:06:48 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 89B7D1A9239
for <gnats-bugs@gnats.NetBSD.org>; Thu, 17 Apr 2025 05:06:48 +0000 (UTC)
Message-Id: <20250417050647.38C381A923D@mollari.NetBSD.org>
Date: Thu, 17 Apr 2025 05:06:47 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: kernel longjmp(9) fails to make setjmp(9) return 1
X-Send-Pr-Version: www-1.0
>Number: 59305
>Category: port-hppa
>Synopsis: kernel longjmp(9) fails to make setjmp(9) return 1
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-hppa-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Apr 17 05:10:00 +0000 2025
>Closed-Date: Sat Sep 20 06:51:13 +0000 2025
>Last-Modified: Sat Sep 20 06:51:13 +0000 2025
>Originator: Taylor R Campbell
>Release: current
>Organization:
Hppa, Skip, and a Jump Foundation
>Environment:
>Description:
Kernel longjmp(9) is supposed to make setjmp(9) return 1 -- it doesn't take a second argument for the return value. But the hppa code does this:
303 bv %r0(%rp)
304 copy %arg1,%ret0 /* Move return value to where it belongs. */
https://nxr.netbsd.org/xref/src/sys/arch/hppa/hppa/support.S?r=1.7#303
So it returns whatever garbage happens to be in a1.
>How-To-Repeat:
code inspection
mess with ddb, probably
>Fix:
Change
copy %arg1,%ret0
to however you spell `load immediate value 1 into %ret0' in hppaish.
>Release-Note:
>Audit-Trail:
From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59305 CVS commit: src/sys/arch/hppa/hppa
Date: Sun, 20 Apr 2025 07:39:30 +0000
Module Name: src
Committed By: skrll
Date: Sun Apr 20 07:39:30 UTC 2025
Modified Files:
src/sys/arch/hppa/hppa: support.S
Log Message:
PR59305: kernel longjmp(9) fails to make setjmp(9) return 1
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/hppa/support.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Wed, 23 Apr 2025 07:00:39 +0000
State-Changed-Why:
Close now?
State-Changed-From-To: feedback->pending-pullups
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Thu, 24 Apr 2025 09:17:34 +0000
State-Changed-Why:
[pullup-10 #1104]
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59305 CVS commit: [netbsd-10] src/sys/arch/hppa/hppa
Date: Fri, 9 May 2025 11:41:40 +0000
Module Name: src
Committed By: martin
Date: Fri May 9 11:41:40 UTC 2025
Modified Files:
src/sys/arch/hppa/hppa [netbsd-10]: support.S
Log Message:
Pull up following revision(s) (requested by skrll in ticket #1104):
sys/arch/hppa/hppa/support.S: revision 1.8
PR59305: kernel longjmp(9) fails to make setjmp(9) return 1
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.30.1 src/sys/arch/hppa/hppa/support.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Sat, 20 Sep 2025 06:51:13 +0000
State-Changed-Why:
pull up done.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.