003 File Manager
Current Path:
/usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers
usr
/
src
/
cddl
/
contrib
/
opensolaris
/
cmd
/
dtrace
/
test
/
tst
/
common
/
pointers
/
📁
..
📄
err.BadAlign.d
(1.2 KB)
📄
err.D_ADDROF_VAR.ArrayVar.d
(1.2 KB)
📄
err.D_ADDROF_VAR.DynamicVar.d
(1.3 KB)
📄
err.D_ADDROF_VAR.agg.d
(1.23 KB)
📄
err.D_DEREF_NONPTR.noptr.d
(1.11 KB)
📄
err.D_DEREF_VOID.VoidPointerDeref.d
(1.23 KB)
📄
err.D_OP_ARRFUN.ArrayAssignment.d
(1.48 KB)
📄
err.D_OP_INCOMPAT.VoidPointerArith.d
(1.23 KB)
📄
err.D_OP_LVAL.AddressChange.d
(1.27 KB)
📄
err.D_OP_PTR.NonPointerAccess.d
(1.34 KB)
📄
err.D_OP_PTR.badpointer.d
(1.19 KB)
📄
err.D_OP_SOU.BadPointerAccess.d
(1.23 KB)
📄
err.D_OP_SOU.badpointer.d
(1.15 KB)
📄
err.InvalidAddress1.d
(1.29 KB)
📄
err.InvalidAddress2.d
(1.26 KB)
📄
err.InvalidAddress3.d
(1.21 KB)
📄
err.InvalidAddress4.d
(1.31 KB)
📄
err.InvalidAddress5.d
(1.72 KB)
📄
tst.ArrayPointer1.d
(5.14 KB)
📄
tst.ArrayPointer2.d
(1.71 KB)
📄
tst.ArrayPointer3.d
(1.67 KB)
📄
tst.GlobalVar.d
(1.46 KB)
📄
tst.IntegerArithmetic1.d
(1.57 KB)
📄
tst.PointerArithmetic1.d
(1.44 KB)
📄
tst.PointerArithmetic2.d
(1.71 KB)
📄
tst.PointerArithmetic3.d
(1.37 KB)
📄
tst.PointerAssignment.d
(1.66 KB)
📄
tst.ValidPointer1.d
(1.26 KB)
📄
tst.ValidPointer2.d
(1.26 KB)
📄
tst.VoidCast.d
(1.32 KB)
📄
tst.basic1.d
(1.27 KB)
📄
tst.basic2.d
(1.33 KB)
Editing: err.InvalidAddress4.d
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* * Copyright (c) 2012 by Delphix. All rights reserved. */ /* * ASSERTION: Demonstrating valid memory access. * * SECTION: Pointers and Arrays/Pointers and Addresses * * NOTES: * */ #pragma D option quiet BEGIN { x = (int *)alloca(sizeof (int)); printf("Address x: %x\n", (int)x); y = (int *)(x - 2); *y = 3; printf("Address y: %x\tValue: %d\n", (int)y, *y); exit(0); } ERROR { exit(1); }
Upload File
Create Folder