summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2013-02-06 08:17:29 +0000
committermm <mm@FreeBSD.org>2013-02-06 08:17:29 +0000
commit7697af6b35ac6f345aeb7bf05cf3b72447455915 (patch)
treee25e09a40eb608c2d8375037d2f524f4b257bb00
parent809893515970be027384e47a4ecc1050600bebaa (diff)
downloadFreeBSD-src-7697af6b35ac6f345aeb7bf05cf3b72447455915.zip
FreeBSD-src-7697af6b35ac6f345aeb7bf05cf3b72447455915.tar.gz
Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 13939:20e4d8d8da6d illumos dtrace issues: 3511 dtrace.c erroneously checks for memory alignment on amd64
-rw-r--r--cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d49
1 files changed, 29 insertions, 20 deletions
diff --git a/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d b/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d
index 64b7728..c4d35e9 100644
--- a/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d
+++ b/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d
@@ -24,7 +24,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
/*
* ASSERTION:
@@ -32,44 +34,51 @@
* a runtime error.
*
* SECTION: Pointers and Arrays/Generic Pointers
- *
- * NOTES:
- * This test doesn't apply to x86; for the time being, we're working
- * around this with the preprocessor.
*/
#pragma D option quiet
-int array[3];
-uintptr_t uptr;
+#if defined(__i386) || defined(__amd64)
+#define __x86 1
+#endif
+
+int array[2];
+char *ptr;
int *p;
int *q;
int *r;
BEGIN
{
-#ifdef __i386
- exit(1);
-#else
- array[0] = 20;
- array[1] = 40;
- array[2] = 80;
+ array[0] = 0x12345678;
+ array[1] = 0xabcdefff;
- uptr = (uintptr_t) &array[0];
+ ptr = (char *) &array[0];
- p = (int *) (uptr);
- q = (int *) (uptr + 2);
- r = (int *) (uptr + 3);
+ p = (int *) (ptr);
+ q = (int *) (ptr + 2);
+ r = (int *) (ptr + 3);
- printf("array[0]: %d\t*p: %d\n", array[0], *p);
- printf("array[1]: %d\t*q: %d\n", array[1], *q);
- printf("array[2]: %d\t*r: %d\n", array[2], *r);
+ printf("*p: 0x%x\n", *p);
+ printf("*q: 0x%x\n", *q);
+ printf("*r: 0x%x\n", *r);
+ /*
+ * On x86, the above unaligned memory accesses are allowed and should
+ * not result in the ERROR probe firing.
+ */
+#ifdef __x86
+ exit(1);
+#else
exit(0);
#endif
}
ERROR
{
+#ifdef __x86
+ exit(0);
+#else
exit(1);
+#endif
}
OpenPOWER on IntegriCloud