From patchwork Fri Sep 8 10:18:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 811478 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-461719-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="JAJZu0nn"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xpYF86r8xz9s3T for ; Fri, 8 Sep 2017 20:18:32 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=ABAxL40NK1mNI/YqFOBuHpSOY5pflpH2yapLzixRfIiDlnysrR 33IfRAJy+PxYm0WUyPqbx+mKMa7CWyqA7Y/EvhwwS1pTYriiICA6UPYFsaVwl2ht OGFOmyY8YcoHpk/2ONRpiwHXgBYCqD+04rifcA+9zoei7+MHpHkmk+xuE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=LGnU7HkpWiDlW+i0R13S88SmCtU=; b=JAJZu0nn8TCgUoOjevGG FxokvYgZ6fkR5fr4p+CMUe/6KmpxupQmSfjy+oHDWFj2EMNxNGEdWKXnkkt1n53V /bWnXWgduruA9s3HAfN0rIC4hQQW6dXsNd/bSmLb45ui47u+AP5VN4/C/UOcUIIs E3BxsAyPFKHv/str4vemWoE= Received: (qmail 14733 invoked by alias); 8 Sep 2017 10:18:25 -0000 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 Received: (qmail 14337 invoked by uid 89); 8 Sep 2017 10:18:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Sep 2017 10:18:20 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 9973F56260; Fri, 8 Sep 2017 06:18:18 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qi1nNNRdFPsU; Fri, 8 Sep 2017 06:18:18 -0400 (EDT) Received: from tron.gnat.com (tron.gnat.com [205.232.38.10]) by rock.gnat.com (Postfix) with ESMTP id 85D6A56126; Fri, 8 Sep 2017 06:18:18 -0400 (EDT) Received: by tron.gnat.com (Postfix, from userid 4192) id 8278D505; Fri, 8 Sep 2017 06:18:18 -0400 (EDT) Date: Fri, 8 Sep 2017 06:18:18 -0400 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Bob Duff Subject: [Ada] Compiler crash on mixed-case source file names Message-ID: <20170908101818.GA47026@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) This patch fixes a bug in which if mixed-case file names are used, and a file name contains any of the capital letters 'U', 'W', 'Q', or 'O', then in rare cases the compiler can crash. No small test is available. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-08 Bob Duff * exp_intr.adb (Add_Source_Info): Do not decode file names; they were not encoded in the first place. Index: exp_intr.adb =================================================================== --- exp_intr.adb (revision 251883) +++ exp_intr.adb (working copy) @@ -125,7 +125,7 @@ Append (Buf, Nat (Get_Logical_Line_Number (Loc))); when Name_File => - Append_Decoded (Buf, Reference_Name (Get_Source_File_Index (Loc))); + Append (Buf, Reference_Name (Get_Source_File_Index (Loc))); when Name_Source_Location => Build_Location_String (Buf, Loc);