From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9578 invoked by alias); 17 Apr 2015 17:51:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 9564 invoked by uid 89); 17 Apr 2015 17:51:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 17 Apr 2015 17:51:40 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 6B5D9A0E7A for ; Fri, 17 Apr 2015 17:51:39 +0000 (UTC) Received: from msebor.csb (vpn-239-25.phx2.redhat.com [10.3.239.25]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3HHpdIj019576 for ; Fri, 17 Apr 2015 13:51:39 -0400 Message-ID: <5531482A.2040006@redhat.com> Date: Fri, 17 Apr 2015 17:51:00 -0000 From: msebor@redhat.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] gfortran.dg/pr32627.f03 prints nul byte References: <5526CAF9.8080907@redhat.com> <5526EC40.8040000@redhat.com> In-Reply-To: <5526EC40.8040000@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00917.txt.bz2 Ping. Is this patch okay for trunk? On 04/09/2015 03:16 PM, Martin Sebor wrote: > Attached is an updated patch that fixes the substr_6.f90 > test that also prints a nul character to stdout. I don't > think there are any others. > > Besides interfering with the debugging of the log corruption > I mentioned, printing nuls or control characters in tests is > also problematic for tools designed to post-process log files > (e.g., grep) that are intended to work with text files (i.e., > files not containing nuls). Control characters can cause the > tools to fail in non-C locales (such as UTF-8). > > On 04/09/2015 12:54 PM, Martin Sebor wrote: >> We've been debugging a problem where nul (and other control) >> characters have been randomly appearing in powerpc parallel >> build logs. In the process, I noticed that some of the nuls >> are readily reproducible. One such case is due to >> the pr32627.f03 test which verifies that Fortran programs >> can initialize character arrays from C strings. The test >> declares an array as big as the C string (including the >> terminating nul) and prints its value to stdout. This then >> causes the nul to appear in the log files. >> >> The attached patch changes the declaration of the Fortran >> array to match the number of non-nul characters. Tested on >> powerpc64. >> >> Martin >