Subject: port-mips/20657: __clone() fails on regression tests when passing null parameters
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jacereda@users.sourceforge.net>
List: netbsd-bugs
Date: 03/11/2003 02:50:40
>Number:         20657
>Category:       port-mips
>Synopsis:       __clone() fails on regression tests when passing null parameters
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-mips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 11 02:51:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jorge Acereda
>Release:        1.6
>Organization:
>Environment:
>Description:
Passing null stack or arg arguments to __clone() results on coredump
>How-To-Repeat:
Tested on playstation2, but should fail on any mips machine:
$ make regression-tests

>Fix:
--- lib/libc/arch/mips/sys/__clone.S.orig       Tue Mar 11 10:44:58 2003
+++ lib/libc/arch/mips/sys/__clone.S    Tue Mar 11 10:45:09 2003
@@ -54,8 +54,8 @@
         * Sanity checks: func and stack may not be NULL.
         */
        li      v0, EINVAL
-       beq     a0, zero, 9f
-       beq     a1, zero, 9f
+       beq     a0, zero, 8f
+       beq     a1, zero, 8f

        /*
         * We need to be able to get at the func and arg arguments

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