Subject: DIAGNOSTIC, bcopy to 0
To: None <daver@siginfo.org, macallan18@earthlink.net>
From: Ross <ross@wasabisystems.com>
List: tech-kern
Date: 02/05/2006 02:24:52
The DIAGNOSTIC problem, now fixed, was caused by the src/common
bcopy merge, which led to a DIAGNOSTIC assertion against a bcopy
zero destination, which caused a panic (on macppc) before console
attachment. The old libkern bcopy allowed a 0 destination.
We might want to think about an explicit API for copies with a
destination that aliases NULL.
> From: Ross Harvey <ross@netbsd.org>
> Subject: CVS commit: src/common/lib/libc/string
> To: source-changes@NetBSD.org
> Date: Sun, 5 Feb 2006 06:47:48 +0000 (UTC)
>
>
> Module Name: src
> Committed By: ross
> Date: Sun Feb 5 06:47:48 UTC 2006
>
> Modified Files:
> src/common/lib/libc/string: bcopy.c
>
> Log Message:
> Don't do DIAGASSERT against NULL if _KERNEL This puts us back to
> kernel behavior before src/common where 0 was a valid dest addr.
>
> This should fix the macppc (and other OEA ppc) silent-death-on-DIAGNOSTIC
> issue, and possibly other DIAGNOSTIC failures.
>
> XXX it might be worth thinking about an API where 0 is allowed in
> documented cases and not allowed otherwise.
>
>
> To generate a diff of this commit:
> cvs rdiff -r1.1 -r1.2 src/common/lib/libc/string/bcopy.c
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.