Subject: lib/23090: setjmp/longjmp fallout from siginfo changes
To: None <gnats-bugs@gnats.netbsd.org>
From: None <thorpej@shagadelic.org>
List: netbsd-bugs
Date: 10/07/2003 15:41:35
>Number:         23090
>Category:       lib
>Synopsis:       setjmp/longjmp fallout from siginfo changes
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 07 22:42:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jason R Thorpe
>Release:        NetBSD 1.6ZC
>Organization:
>Environment:
	
	
System: NetBSD yeah-baby.shagadelic.org 1.6ZC NetBSD 1.6ZC (YEAH-BABY-XP) #20: Sat Sep 20 10:24:38 PDT 2003 thorpej@yeah-baby.shagadelic.org:/u1/netbsd/src/sys/arch/i386/compile/YEAH-BABY-XP i386
Architecture: i386
Machine: i386
>Description:
	The siginfo changes (and resulting deprecation of sigreturn)
	have caused a major backward compatibility problem for
	setjmp/longjmp.

	The following platforms use __sigreturn14 to implement their
	longjump functionality:

		alpha
		m68k
		mips
		hppa
		sparc
		sparc64
		vax
		sh5

	These platforms no longer having working setjmp/longjmp if
	COMPAT_16 is not in the kernel configuration.

>How-To-Repeat:
	Remove COMPAT_16 from your kernel, and attempt to use setjmp/longjmp
	on any of the architectures listed above.

	Problem was noticed by code inspection.
>Fix:
	The right thing to do is to version the setjmp/longjmp family
	of functions again (for ALL architectures) and re-implement using
	using getcontext()/setcontext().  Perhaps the lightweight versions
	of these functions from libpthread could be integrated into libc
	for part of the implementation.
>Release-Note:
>Audit-Trail:
>Unformatted: