From patchwork Wed Aug 10 08:30:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Morton X-Patchwork-Id: 9272823 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 47CC06022E for ; Wed, 10 Aug 2016 08:30:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 374F22838E for ; Wed, 10 Aug 2016 08:30:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B900283E9; Wed, 10 Aug 2016 08:30:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C39B2283A6 for ; Wed, 10 Aug 2016 08:30:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B86EE6E6F1; Wed, 10 Aug 2016 08:30:06 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTP id A47EE6E6F4 for ; Wed, 10 Aug 2016 08:30:05 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 10 Aug 2016 01:30:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,498,1464678000"; d="scan'208";a="153515828" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga004.fm.intel.com with ESMTP; 10 Aug 2016 01:30:05 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.123]) by IRSMSX107.ger.corp.intel.com ([169.254.10.204]) with mapi id 14.03.0248.002; Wed, 10 Aug 2016 09:30:03 +0100 From: "Morton, Derek J" To: "intel-gfx@lists.freedesktop.org" Thread-Topic: [PATCH i-g-t v2] gem_largeobject: Fix for clang compiler Thread-Index: AQHR7l2+7HMNHLXi4kGyRuDIGletBaBB5c4A Date: Wed, 10 Aug 2016 08:30:03 +0000 Message-ID: <2D016F5BA44C744783BA96B1D3EBC5BD14002BBC@IRSMSX102.ger.corp.intel.com> References: <1470321443-15671-1-git-send-email-derek.j.morton@intel.com> In-Reply-To: <1470321443-15671-1-git-send-email-derek.j.morton@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWZmYWVjZmEtMDk0ZC00YWY3LWE0YzktMjQxYmJmYzdlMWRhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlE3MFwvOXVSMjNFXC9QXC9vbGt1dkdsN05RQjZZRFU5RnZDWkVmVFo5RFZhTjQ9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] MIME-Version: 1.0 Subject: Re: [Intel-gfx] [PATCH i-g-t v2] gem_largeobject: Fix for clang compiler X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Bump, Can this be merged? It is a simple fix for an issue with the clang compiler. //Derek -----Original Message----- From: Morton, Derek J Sent: Thursday, August 4, 2016 3:37 PM To: intel-gfx@lists.freedesktop.org Cc: Gore, Tim ; Morton, Derek J Subject: [PATCH i-g-t v2] gem_largeobject: Fix for clang compiler The clang compiler generates a build error for binaries with >128MB data segments because "The gap between stack and binary is only guarenteed to be 128MB on x86_64" Simple solution is to allocate the required memory from the heap. [v2: moved malloc to after skip_on_simulation] Signed-off-by: Derek Morton --- tests/gem_largeobject.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) igt_skip_on_simulation(); + data = malloc(OBJ_SIZE); + igt_assert(data); + fd = drm_open_driver(DRIVER_INTEL); test_large_object(fd); + + free(data); } -- 1.9.1 diff --git a/tests/gem_largeobject.c b/tests/gem_largeobject.c index c001c17..518396f 100644 --- a/tests/gem_largeobject.c +++ b/tests/gem_largeobject.c @@ -39,7 +39,7 @@ /* Should take 64 pages to store the page pointers on 64 bit */ #define OBJ_SIZE (128 * 1024 * 1024) -unsigned char data[OBJ_SIZE]; +unsigned char *data; static void test_large_object(int fd) @@ -79,7 +79,12 @@ igt_simple_main