tst.haslam.d revision 178476
1227825Stheraven/*
2227825Stheraven * CDDL HEADER START
3227825Stheraven *
4227825Stheraven * The contents of this file are subject to the terms of the
5227825Stheraven * Common Development and Distribution License (the "License").
6227825Stheraven * You may not use this file except in compliance with the License.
7227825Stheraven *
8227825Stheraven * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9227825Stheraven * or http://www.opensolaris.org/os/licensing.
10227825Stheraven * See the License for the specific language governing permissions
11227825Stheraven * and limitations under the License.
12227825Stheraven *
13227825Stheraven * When distributing Covered Code, include this CDDL HEADER in each
14227825Stheraven * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15227825Stheraven * If applicable, add the following below this CDDL HEADER, with the
16227825Stheraven * fields enclosed by brackets "[]" replaced with your own identifying
17227825Stheraven * information: Portions Copyright [yyyy] [name of copyright owner]
18227825Stheraven *
19227825Stheraven * CDDL HEADER END
20227825Stheraven */
21227825Stheraven
22227825Stheraven/*
23227825Stheraven * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24227825Stheraven * Use is subject to license terms.
25227825Stheraven */
26227825Stheraven
27227825Stheraven#pragma ident	"%Z%%M%	%I%	%E% SMI"
28227825Stheraven
29227825Stheraven/*
30227825Stheraven * ASSERTION: test for off-by-one error in the format lookup code
31227825Stheraven *
32227825Stheraven * SECTION: Aggregations/Aggregations; Misc
33227825Stheraven */
34227825Stheraven
35227825Stheraven/*
36227825Stheraven * A script from Jon Haslam that induced an off-by-one error in the
37227825Stheraven * format lookup code.
38227825Stheraven */
39227825StheravenBEGIN
40227825Stheraven{
41262801Sdim	start = timestamp;
42262801Sdim	allocd = 0;
43227825Stheraven	numallocs = 0;
44262801Sdim	numfrees = 0;
45227825Stheraven	numtids = 0;
46227825Stheraven}
47227825Stheraven
48227825Stheravensyscall:::entry
49227825Stheraven{
50227825Stheraven	@sys[tid] = sum(tid);
51227825Stheraven}
52227825Stheraven
53262801SdimEND
54227825Stheraven{
55227825Stheraven	printf("%s, %s, %s, %d numtids", "hhh", "jjj", "ggg", numtids );
56227825Stheraven	printa(@sys);
57227825Stheraven}
58227825Stheraven
59227825Stheraventick-1sec
60227825Stheraven/n++ == 5/
61227825Stheraven{
62227825Stheraven	exit(0);
63227825Stheraven}
64227825Stheraven