NetBSD Problem Report #59370
From www@netbsd.org Mon Apr 28 02:43:03 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) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 9802B1A9239
for <gnats-bugs@gnats.NetBSD.org>; Mon, 28 Apr 2025 02:43:03 +0000 (UTC)
Message-Id: <20250428024301.D49721A923C@mollari.NetBSD.org>
Date: Mon, 28 Apr 2025 02:43:01 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: compat 1.3 setjmp is busted
X-Send-Pr-Version: www-1.0
>Number: 59370
>Category: port-sparc64
>Synopsis: compat 1.3 setjmp is busted
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: martin
>State: pending-pullups
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 28 02:45:00 +0000 2025
>Closed-Date:
>Last-Modified: Sat May 10 17:55:03 +0000 2025
>Originator: Taylor R Campbell
>Release: current
>Organization:
The Jumper Cable is Sparcing, Inc.
>Environment:
>Description:
Test case: lib/libc/setjmp/t_setjmp/compat13_longjmp_zero
Duration: 0.147627 seconds
Termination reason
FAILED: /tmp/build/2025.04.25.07.57.42-sparc64/src/tests/lib/libc/setjmp/t_setjmp.c:234: setjmp returned wrong value
Test case: lib/libc/setjmp/t_setjmp/compat13_setjmp
Duration: 0.149045 seconds
Termination reason
FAILED: /tmp/build/2025.04.25.07.57.42-sparc64/src/tests/lib/libc/setjmp/t_setjmp.c:237: setjmp returned wrong value
Test case: lib/libc/setjmp/t_setjmp/compat13_sigsetjmp_save
Duration: 0.144404 seconds
Termination reason
FAILED: /tmp/build/2025.04.25.07.57.42-sparc64/src/tests/lib/libc/setjmp/t_setjmp.c:237: setjmp returned wrong value
Test case: lib/libc/setjmp/t_sigstack/compat13_setjmp
Duration: 0.150036 seconds
Termination reason
FAILED: /tmp/build/2025.04.25.07.57.42-sparc64/src/tests/lib/libc/setjmp/t_sigstack.c:106: 3 recursive signal handler entries is too many in this test
Test case: lib/libc/setjmp/t_sigstack/compat13_sigsetjmp
Duration: 0.149530 seconds
Termination reason
FAILED: /tmp/build/2025.04.25.07.57.42-sparc64/src/tests/lib/libc/setjmp/t_sigstack.c:106: 3 recursive signal handler entries is too many in this test
https://releng.netbsd.org/b5reports/sparc64/2025/2025.04.25.07.57.42/test.html#lib_libc_setjmp_t_setjmp_compat13_longjmp_zero
Same results on real sparc64 hardware:
https://www.netbsd.org/~martin/sparc64-atf/966_atf.html#lib_libc_setjmp_t_setjmp_compat13_longjmp_zero
>How-To-Repeat:
cd /usr/tests/lib/libc/setjmp
atf-run | atf-report
>Fix:
Yes, please!
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: port-sparc64-maintainer->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Mon, 28 Apr 2025 10:02:03 +0000
Responsible-Changed-Why:
take
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59370 CVS commit: src/tests/lib/libc/setjmp
Date: Mon, 28 Apr 2025 13:09:26 +0000
Module Name: src
Committed By: riastradh
Date: Mon Apr 28 13:09:26 UTC 2025
Modified Files:
src/tests/lib/libc/setjmp: t_setjmp.c t_sigstack.c
Log Message:
tests/lib/libc/setjmp: Mark compat 1.3 setjmp busted on sparc64.
PR port-sparc64/59370: compat 1.3 setjmp is busted
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libc/setjmp/t_setjmp.c
cvs rdiff -u -r1.22 -r1.23 src/tests/lib/libc/setjmp/t_sigstack.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59370 CVS commit: src/lib/libc/compat/arch/sparc64/gen
Date: Mon, 28 Apr 2025 18:15:53 +0000
Module Name: src
Committed By: martin
Date: Mon Apr 28 18:15:53 UTC 2025
Modified Files:
src/lib/libc/compat/arch/sparc64/gen: compat_setjmp.S
Log Message:
PR 59370: compat_13: since we do not initialize the %o0 slot in jmpbuf
in setjmp() we need to store the full 64bit argument from longjmp()
there, otherwise the upper 32bit will be random garbage.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/compat/arch/sparc64/gen/compat_setjmp.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59370 CVS commit: src/tests/lib/libc/setjmp
Date: Mon, 28 Apr 2025 18:29:09 +0000
Module Name: src
Committed By: martin
Date: Mon Apr 28 18:29:09 UTC 2025
Modified Files:
src/tests/lib/libc/setjmp: t_setjmp.c t_sigstack.c
Log Message:
PR 59370: compat 1.3 setjmp has been fixed
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libc/setjmp/t_setjmp.c
cvs rdiff -u -r1.23 -r1.24 src/tests/lib/libc/setjmp/t_sigstack.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->needs-pullups
State-Changed-By: martin@NetBSD.org
State-Changed-When: Mon, 28 Apr 2025 18:34:05 +0000
State-Changed-Why:
Same bug in netbsd-10 and -9
State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: martin@NetBSD.org
State-Changed-When: Tue, 29 Apr 2025 10:11:07 +0000
State-Changed-Why:
[pullup-10 #1108]
[pullup-9 #1946]
From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59370 CVS commit: [netbsd-10] src/lib/libc/compat/arch/sparc64/gen
Date: Sat, 10 May 2025 17:48:30 +0000
Module Name: src
Committed By: bouyer
Date: Sat May 10 17:48:30 UTC 2025
Modified Files:
src/lib/libc/compat/arch/sparc64/gen [netbsd-10]: compat_setjmp.S
Log Message:
Pull up following revision(s) (requested by martin in ticket #1108):
lib/libc/compat/arch/sparc64/gen/compat_setjmp.S: revision 1.2
PR 59370: compat_13: since we do not initialize the %o0 slot in jmpbuf
in setjmp() we need to store the full 64bit argument from longjmp()
there, otherwise the upper 32bit will be random garbage.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.96.1 \
src/lib/libc/compat/arch/sparc64/gen/compat_setjmp.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59370 CVS commit: [netbsd-9] src/lib/libc/compat/arch/sparc64/gen
Date: Sat, 10 May 2025 17:52:28 +0000
Module Name: src
Committed By: bouyer
Date: Sat May 10 17:52:27 UTC 2025
Modified Files:
src/lib/libc/compat/arch/sparc64/gen [netbsd-9]: compat_setjmp.S
Log Message:
Pull up following revision(s) (requested by martin in ticket #1946):
lib/libc/compat/arch/sparc64/gen/compat_setjmp.S: revision 1.2
PR 59370: compat_13: since we do not initialize the %o0 slot in jmpbuf
in setjmp() we need to store the full 64bit argument from longjmp()
there, otherwise the upper 32bit will be random garbage.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.88.1 \
src/lib/libc/compat/arch/sparc64/gen/compat_setjmp.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>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.