Subject: port-i386/13498: i386 clone(2) stub doesn't do exit status properly
To: None <gnats-bugs@gnats.netbsd.org>
From: None <thorpej@zembu.com>
List: netbsd-bugs
Date: 07/17/2001 17:02:22
>Number:         13498
>Category:       port-i386
>Synopsis:       i386 clone(2) stub doesn't do exit status properly
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 17 17:00:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jason R. Thorpe
>Release:        Tue Jul 17 16:59:31 PDT 2001
>Organization:
Zembu Labs, Inc.
>Environment:
	
System: NetBSD dr-evil 1.5W NetBSD 1.5W (DR-EVIL) #200: Fri Jun 15 15:05:53 PDT 2001 thorpej@dr-evil:/u1/netbsd/src/sys/arch/i386/compile/DR-EVIL i386
Architecture: i386
Machine: i386
>Description:
	The new i386 clone(2) stub doesn't report exit status properly,
	if the program using clone(2) is dynamically linked.

	This appears to be due to the fact that _exit() is being
	called incorrectly from __clone.S.  If the program is linked
	statically, the test works fine.  If __clone.S is changed to
	invoke SYS_exit directly, it works fine.  If __clone.S is
	changed to not do the PIC_PLT stuff (i.e. just call _exit
	directly), it works fine.

>How-To-Repeat:
	Run the regression test in src/regress/lib/libc/clone.

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: