err.badbcopy3.d revision 2633:71bab08d24b2
1255570Strasz/*
2255570Strasz * CDDL HEADER START
3255570Strasz *
4255570Strasz * The contents of this file are subject to the terms of the
5255570Strasz * Common Development and Distribution License (the "License").
6255570Strasz * You may not use this file except in compliance with the License.
7255570Strasz *
8255570Strasz * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9255570Strasz * or http://www.opensolaris.org/os/licensing.
10255570Strasz * See the License for the specific language governing permissions
11255570Strasz * and limitations under the License.
12255570Strasz *
13255570Strasz * When distributing Covered Code, include this CDDL HEADER in each
14255570Strasz * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15255570Strasz * If applicable, add the following below this CDDL HEADER, with the
16255570Strasz * fields enclosed by brackets "[]" replaced with your own identifying
17255570Strasz * information: Portions Copyright [yyyy] [name of copyright owner]
18255570Strasz *
19255570Strasz * CDDL HEADER END
20255570Strasz */
21255570Strasz
22255570Strasz/*
23255570Strasz * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24255570Strasz * Use is subject to license terms.
25255570Strasz */
26255570Strasz
27255570Strasz#pragma	ident	"%Z%%M%	%I%	%E% SMI"
28255570Strasz
29255570Strasz/*
30255570Strasz * ASSERTION:
31270888Strasz *	bcopy should not copy from one memory location to another
32270888Strasz *	if the memory is not properly allocated
33270888Strasz *
34255570Strasz * SECTION: Actions and Subroutines/bcopy()
35255570Strasz *
36255570Strasz */
37255570Strasz
38255570Strasz#pragma D option quiet
39268140Smav
40268140SmavBEGIN
41255570Strasz{
42255570Strasz	/* Attempt to copy to a NULL address */
43255570Strasz	bcopy((void *)&`kmem_flags, (void *)NULL, sizeof (int));
44255570Strasz	exit(1);
45255570Strasz}
46255570Strasz
47255570StraszERROR
48255570Strasz{
49255570Strasz	exit(1);
50255570Strasz}
51255570Strasz