From owner-svn-src-vendor@FreeBSD.ORG Wed Feb 6 08:17:30 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5C665F4E; Wed, 6 Feb 2013 08:17:30 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2B246711; Wed, 6 Feb 2013 08:17:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r168HUEq039434; Wed, 6 Feb 2013 08:17:30 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r168HUmW039433; Wed, 6 Feb 2013 08:17:30 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201302060817.r168HUmW039433@svn.freebsd.org> From: Martin Matuska Date: Wed, 6 Feb 2013 08:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r246391 - vendor-sys/illumos/dist/uts/common/dtrace vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2013 08:17:30 -0000 Author: mm Date: Wed Feb 6 08:17:29 2013 New Revision: 246391 URL: http://svnweb.freebsd.org/changeset/base/246391 Log: 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 Modified: vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c Modified: vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d ============================================================================== --- vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d Wed Feb 6 08:14:58 2013 (r246390) +++ vendor/illumos/dist/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d Wed Feb 6 08:17:29 2013 (r246391) @@ -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 + array[0] = 0x12345678; + array[1] = 0xabcdefff; + + ptr = (char *) &array[0]; + + p = (int *) (ptr); + q = (int *) (ptr + 2); + r = (int *) (ptr + 3); + + 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 - array[0] = 20; - array[1] = 40; - array[2] = 80; - - uptr = (uintptr_t) &array[0]; - - p = (int *) (uptr); - q = (int *) (uptr + 2); - r = (int *) (uptr + 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); - exit(0); #endif } ERROR { +#ifdef __x86 + exit(0); +#else exit(1); +#endif }