From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118561 invoked by alias); 17 Aug 2017 15:51:23 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 118503 invoked by uid 89); 17 Aug 2017 15:51:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Aug 2017 15:51:21 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9E2E5C0587C1; Thu, 17 Aug 2017 15:51:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9E2E5C0587C1 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dmalcolm@redhat.com Received: from ovpn-117-90.phx2.redhat.com (ovpn-117-90.phx2.redhat.com [10.3.117.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C89970625; Thu, 17 Aug 2017 15:51:18 +0000 (UTC) Message-ID: <1502985078.3741.26.camel@redhat.com> Subject: Re: [committed] jit: add gcc_jit_type_get_vector From: David Malcolm To: Michael Cree Cc: jit@gcc.gnu.org Date: Sun, 01 Jan 2017 00:00:00 -0000 In-Reply-To: <20170816211520.GA2399@cree.waikato.ac.nz> References: <20170809084227.s23odfpcdyjvrtin@tower> <1502326873-58234-1-git-send-email-dmalcolm@redhat.com> <20170816095854.dp3qe5dmsuqnblsg@tower> <1502892117.3741.15.camel@redhat.com> <20170816211520.GA2399@cree.waikato.ac.nz> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 17 Aug 2017 15:51:19 +0000 (UTC) X-IsSubscribed: yes X-SW-Source: 2017-q3/txt/msg00011.txt.bz2 On Thu, 2017-08-17 at 09:15 +1200, Michael Cree wrote: > On Wed, Aug 16, 2017 at 10:01:57AM -0400, David Malcolm wrote: > > On Wed, 2017-08-16 at 21:58 +1200, Michael Cree wrote: > > > > > > But I have hit a problem which I suspect is a bug in the gcc > > > optimiser. > > > > > > In the vein of your example above, but working on uint8_t pixel > > > data > > > and adding saturation, the jit compiler segfaults in the > > > optimiser. I > > > provide below the gimple produced by the function that causes the > > > problem (I presume that is more useful than the code calling the > > > gcc_jit routines), > > > > There's actually a handy entrypoint for generating minimal > > reproducers > > for such crashes: > > gcc_jit_context_dump_reproducer_to_file > > > > https://gcc.gnu.org/onlinedocs/jit/topics/contexts.html#gcc_jit_con > > text_dump_reproducer_to_file > > > > Can you add a call to that to your code (after the context is fully > > populated), and see if the resulting .c file leads to the crash > > when > > run? If so, can you post the .c file here please (or attach it to > > bugzilla), and hopefully I can then reproduce it at my end. > > Attached. > > Cheers > Michael. Thanks. I'm able to reproduce the crash using that; am investigating. Dave