From patchwork Fri Oct 19 03:40:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinliang David Li X-Patchwork-Id: 192497 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 244842C0093 for ; Fri, 19 Oct 2012 14:40:40 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1351222841; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=E74t3YT KvSUQ6neaKmqh4+nmue8=; b=ApgdfIesMuijakpZLPr8yntvjxI5vBU4OFMU8hi uzlgGzL4kqBavJhpx2y3aTudOvUb1JLBQ7nS7LPzXbtzRlgvJt1p/mnJR0JbKdr4 umSbd0zj3xVedLpPfoqc7A88S5YOBTTW85cCtLZosuokvLIpdT+uqLk4hLCXkIZu iMyg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-System-Of-Record:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=loi5nxp0pjjWR72Rws9FWwecU7i9N7SqamUoKOPQQsh2mdmlHmmRc/X96yERA7 GlIHWQujZq2MRpwahtrtacqMmsBFVITs9u/DPZ94Z/Uy/QrL8bZeaGM53Ib/ROOk cZIA/EyavNhFSwHYtV/nDyFcUrkGNM4y7YL2EtX3CR63A=; Received: (qmail 29322 invoked by alias); 19 Oct 2012 03:40:37 -0000 Received: (qmail 29314 invoked by uid 22791); 19 Oct 2012 03:40:36 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-qa0-f54.google.com (HELO mail-qa0-f54.google.com) (209.85.216.54) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Oct 2012 03:40:33 +0000 Received: by mail-qa0-f54.google.com with SMTP id p27so71712qat.20 for ; Thu, 18 Oct 2012 20:40:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type :x-system-of-record:x-gm-message-state; bh=X7LKArS5E1HoB+t+vQCTBkE61LFCHJqgmkvtkXxShv8=; b=QmlyUN1uE4BxgTt+TxCF1D/RqSy3JgPmwyk/dVK/0GStKK5i33jbYD0oQuNtKVS1TZ 5tQQdCncd/z/afwsx7tJIykzlzImf4TMyYBKDR84/WgqGRQPs1NYg14fbPiBb4vi1x0w QTISCcoSVdQ7vXBqp9pUywPDpmQgCrlZUl/Plib5IuIZjKEIKSIO936sZKaPAwtd1dg0 Nq8AabtAWqpKVlT+y0Ave/EArGpJgHpKfQt6nnPeZy3R/odBKPX4BP/DAxkxF42yO+tE Z1u1oM5wb4xVlz0+y+nuHvqYO82kKP3A7tB+O5P4Q1cjYRlZq4E445qyduUy8TBHdqxQ 5IEQ== MIME-Version: 1.0 Received: by 10.229.177.147 with SMTP id bi19mr9841379qcb.81.1350618032759; Thu, 18 Oct 2012 20:40:32 -0700 (PDT) Received: by 10.49.18.163 with HTTP; Thu, 18 Oct 2012 20:40:32 -0700 (PDT) Date: Thu, 18 Oct 2012 20:40:32 -0700 Message-ID: Subject: [asan] Change shadow type from unsigned to signed From: Xinliang David Li To: GCC Patches Cc: Jakub Jelinek , Diego Novillo , Dodji Seketeli , Wei Mi X-System-Of-Record: true X-Gm-Message-State: ALoCoQmVsbA2MgjAjLDHPgACBBmUpHkmDEuFDRZqpHy7QQBiKewz1GcQ08Y2Et3ovRKBk2P4akJ3OTfQ8JvHdojpdLmur0S05+1shViJ7zNXlt8yslvK/tWZ632g4i8y6WifLaiCknM5cVzBGZcv2EZO/hiPklI0yApBQ/SzDh0Rutf+kH+rsia2JK9WNAWvN43wSCt80fTK X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The following is small bug fix caught during testing. The shadow value for redzone can be negative, so the shadow type must be signed for the check to succeed. Ok for the branch? thanks, David Index: asan.c =================================================================== --- asan.c (revision 192567) +++ asan.c (working copy) @@ -825,10 +825,10 @@ static void asan_init_shadow_ptr_types (void) { asan_shadow_set = new_alias_set (); - shadow_ptr_types[0] = build_distinct_type_copy (unsigned_char_type_node); + shadow_ptr_types[0] = build_distinct_type_copy (signed_char_type_node); TYPE_ALIAS_SET (shadow_ptr_types[0]) = asan_shadow_set; shadow_ptr_types[0] = build_pointer_type (shadow_ptr_types[0]); - shadow_ptr_types[1] = build_distinct_type_copy (short_unsigned_type_node); + shadow_ptr_types[1] = build_distinct_type_copy (short_integer_type_node); TYPE_ALIAS_SET (shadow_ptr_types[1]) = asan_shadow_set; shadow_ptr_types[1] = build_pointer_type (shadow_ptr_types[1]); }