From patchwork Thu Aug 4 14:19:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Morton X-Patchwork-Id: 9263737 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 E83B56048B for ; Thu, 4 Aug 2016 14:19:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA13928330 for ; Thu, 4 Aug 2016 14:19:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE54428407; Thu, 4 Aug 2016 14:19:51 +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]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2C5628330 for ; Thu, 4 Aug 2016 14:19:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D8AD16E9A2; Thu, 4 Aug 2016 14:19:47 +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 0B02A6E9A5 for ; Thu, 4 Aug 2016 14:19:44 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 04 Aug 2016 07:19:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.28,470,1464678000"; d="scan'208"; a="1029714158" Received: from djmorton-linux2.isw.intel.com ([10.102.226.90]) by orsmga002.jf.intel.com with ESMTP; 04 Aug 2016 07:19:42 -0700 From: Derek Morton To: intel-gfx@lists.freedesktop.org Date: Thu, 4 Aug 2016 15:19:30 +0100 Message-Id: <1470320370-4992-1-git-send-email-derek.j.morton@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [Intel-gfx] [PATCH i-g-t] 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: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Derek Morton --- tests/gem_largeobject.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/gem_largeobject.c b/tests/gem_largeobject.c index c001c17..4f323bb 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) @@ -77,6 +77,9 @@ igt_simple_main { int fd; + data = malloc(OBJ_SIZE); + igt_assert(data); + igt_skip_on_simulation(); fd = drm_open_driver(DRIVER_INTEL);