err.badalloca.d revision 178476
1235427Sdelphij/* 2235427Sdelphij * CDDL HEADER START 3235427Sdelphij * 4235427Sdelphij * The contents of this file are subject to the terms of the 5235427Sdelphij * Common Development and Distribution License (the "License"). 6235427Sdelphij * You may not use this file except in compliance with the License. 7235427Sdelphij * 8235427Sdelphij * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9235427Sdelphij * or http://www.opensolaris.org/os/licensing. 10235427Sdelphij * See the License for the specific language governing permissions 11235427Sdelphij * and limitations under the License. 12235427Sdelphij * 13235427Sdelphij * When distributing Covered Code, include this CDDL HEADER in each 14235427Sdelphij * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15235427Sdelphij * If applicable, add the following below this CDDL HEADER, with the 16235427Sdelphij * fields enclosed by brackets "[]" replaced with your own identifying 17235427Sdelphij * information: Portions Copyright [yyyy] [name of copyright owner] 18235427Sdelphij * 19235427Sdelphij * CDDL HEADER END 20235427Sdelphij */ 21235427Sdelphij 22235427Sdelphij/* 23235427Sdelphij * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24235427Sdelphij * Use is subject to license terms. 25235427Sdelphij */ 26235427Sdelphij 27235427Sdelphij#pragma ident "%Z%%M% %I% %E% SMI" 28235427Sdelphij 29235427Sdelphij 30235427Sdelphij/* 31235427Sdelphij * ASSERTION: 32235427Sdelphij * memory allocated by alloca() is only valid within the clause 33235427Sdelphij * it is allocated. 34235427Sdelphij * 35235427Sdelphij * SECTION: Actions and Subroutines/alloca() 36235427Sdelphij * 37235427Sdelphij */ 38235427Sdelphij 39235427Sdelphij#pragma D option quiet 40235427Sdelphij 41235427Sdelphij 42235427SdelphijBEGIN 43235427Sdelphij{ 44235427Sdelphij ptr = alloca(sizeof (int)); 45235427Sdelphij} 46235427Sdelphij 47235427Sdelphijtick-1 48235427Sdelphij{ 49235427Sdelphij bcopy((void *)&`kmem_flags, ptr, sizeof (int)); 50235427Sdelphij exit(0); 51235427Sdelphij} 52235427Sdelphij 53235427SdelphijERROR 54235427Sdelphij{ 55235427Sdelphij exit(1); 56235427Sdelphij} 57235427Sdelphij