err.InvalidAddress2.d revision 178476
1272343Sngie/*
2272343Sngie * CDDL HEADER START
3272343Sngie *
4272343Sngie * The contents of this file are subject to the terms of the
5272343Sngie * Common Development and Distribution License (the "License").
6272343Sngie * You may not use this file except in compliance with the License.
7272343Sngie *
8272343Sngie * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9272343Sngie * or http://www.opensolaris.org/os/licensing.
10272343Sngie * See the License for the specific language governing permissions
11272343Sngie * and limitations under the License.
12272343Sngie *
13272343Sngie * When distributing Covered Code, include this CDDL HEADER in each
14272343Sngie * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15272343Sngie * If applicable, add the following below this CDDL HEADER, with the
16272343Sngie * fields enclosed by brackets "[]" replaced with your own identifying
17272343Sngie * information: Portions Copyright [yyyy] [name of copyright owner]
18272343Sngie *
19272343Sngie * CDDL HEADER END
20272343Sngie */
21272343Sngie
22272343Sngie/*
23272343Sngie * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24272343Sngie * Use is subject to license terms.
25272343Sngie */
26272343Sngie
27272343Sngie#pragma ident	"%Z%%M%	%I%	%E% SMI"
28272343Sngie
29272343Sngie/*
30272343Sngie * ASSERTION: D pointers do not allow invalid pointer accesses.
31272343Sngie *
32272343Sngie * SECTION: Pointers and Arrays/Pointer Safety
33272343Sngie *
34272343Sngie * NOTES:
35272343Sngie *
36272343Sngie */
37272343Sngie
38272343Sngie#pragma D option quiet
39272343Sngie
40272343SngieBEGIN
41272343Sngie{
42272343Sngie	x = (int *)alloca(sizeof (int));
43272343Sngie	trace(x);
44272343Sngie	y = (int *) (x - 3300778156056);
45272343Sngie	*y = 3;
46272343Sngie	trace(*y);
47272343Sngie}
48272343Sngie
49272343SngieERROR
50272343Sngie{
51272343Sngie	exit(1);
52272343Sngie}
53272343Sngie