err.InvalidAddress1.d revision 9512fe850e98fdd448c638ca63fdd92a8a510255
2058N/A/*
2058N/A * CDDL HEADER START
2058N/A *
2058N/A * The contents of this file are subject to the terms of the
2058N/A * Common Development and Distribution License (the "License").
2058N/A * You may not use this file except in compliance with the License.
2058N/A *
2058N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2058N/A * or http://www.opensolaris.org/os/licensing.
2058N/A * See the License for the specific language governing permissions
2058N/A * and limitations under the License.
2058N/A *
2058N/A * When distributing Covered Code, include this CDDL HEADER in each
2058N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2058N/A * If applicable, add the following below this CDDL HEADER, with the
2058N/A * fields enclosed by brackets "[]" replaced with your own identifying
2058N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2058N/A *
2058N/A * CDDL HEADER END
2058N/A */
4070N/A
4070N/A/*
6033N/A * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
2058N/A * Use is subject to license terms.
4070N/A */
2058N/A
2058N/A#pragma ident "%Z%%M% %I% %E% SMI"
2058N/A
6033N/A/*
2058N/A * ASSERTION: D pointers do not allow invalid pointer accesses.
2058N/A *
2058N/A * SECTION: Pointers and Arrays/Pointer Safety
6033N/A *
2058N/A * NOTES:
4070N/A *
2058N/A */
2058N/A
6033N/A#pragma D option quiet
3661N/A
3996N/ABEGIN
3996N/A{
3996N/A kmemAddress = &`kmem_flags;
2058N/A *kmemAddress = 20;
2058N/A printf("Address of kmem_flags: %d\n", (int) kmemAddress);
2058N/A printf("Value of kmem_flags: %d\n", `kmem_flags);
4070N/A exit(0);
4070N/A}
2058N/A
2058N/AERROR
2058N/A{
2058N/A exit(1);
2058N/A}
2058N/A