From patchwork Thu Nov 13 18:04:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 410530 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 67ECA14010B for ; Fri, 14 Nov 2014 05:05:09 +1100 (AEDT) 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:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=d2cXaOIZeg+HO/v77 ZN69CXNuEAHi3NbrQpY77B10qsowUewU4etEP2oRsLYXC9k7GP/9aDOjIIkUOiL+ f+bZA65P01QTV4LjDCrQd15EF6nlI7vIxE55xLDZy7TJuaEcDoF2jQ7aT5s5kQ0c g1k0Z88J9AXLkVdr3q/xFYLjlI= 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:references:mime-version :content-type:in-reply-to; s=default; bh=TGtqRVEZHs9cpEKJ1RdjDVY XmRU=; b=qX6P+JWbscSd83peUofXvP+gR7vLa4v5SJpLrZQpSMm1UFItjRnu1pw bCOskB4kLbSolrTCOeV77MGBTiZVx82+aKXJ1c91P0DLjT3mF0E/R1ry0sI363Eh jSNga8nDHFT9yodWUWdoECqrSVFtJkxM8TynXj++VJ7iBWGjwMno= Received: (qmail 14577 invoked by alias); 13 Nov 2014 18:05:02 -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 14557 invoked by uid 89); 13 Nov 2014 18:05:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients 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; Thu, 13 Nov 2014 18:04:59 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sADI4uAS021878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 13 Nov 2014 13:04:56 -0500 Received: from redhat.com (ovpn-116-30.ams2.redhat.com [10.36.116.30]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sADI4pKC015743 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Thu, 13 Nov 2014 13:04:54 -0500 Date: Thu, 13 Nov 2014 19:04:51 +0100 From: Marek Polacek To: Jakub Jelinek Cc: Janne Blomqvist , FX , Fortran List , GCC Patches Subject: Re: [PATCH, libgfortran] PR 60324 Unbounded stack allocations in libgfortran Message-ID: <20141113180451.GS29791@redhat.com> References: <99A3CFB6-238A-45FE-87B0-03EFE55185ED@gmail.com> <20141113155707.GR29791@redhat.com> <20141113155909.GV5026@tucnak.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20141113155909.GV5026@tucnak.redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) On Thu, Nov 13, 2014 at 04:59:09PM +0100, Jakub Jelinek wrote: > On Thu, Nov 13, 2014 at 04:57:08PM +0100, Marek Polacek wrote: > > On Thu, Nov 13, 2014 at 02:05:52PM +0200, Janne Blomqvist wrote: > > > Thanks for the quick review, committed as r217480. > > > > This broke bootstrap because of implicit declaration of free. > > > > The following (untested) should fix it, ok for trunk? > > > > 2014-11-13 Marek Polacek > > > > * intrinsics/access.c: Include . > > * intrinsics/chdir.c: Likewise. > > * intrinsics/chmod.c: Likewise. > > Ok, thanks. The previous version was incomplete. The following should be. Applying to trunk. 2014-11-13 Marek Polacek * intrinsics/access.c: Include . * intrinsics/chdir.c: Likewise. * intrinsics/chmod.c: Likewise. * intrinsics/link.c: Likewise. * intrinsics/perror.c: Likewise. * intrinsics/rename.c: Likewise. * intrinsics/symlnk.c: Likewise. * intrinsics/unlink.c: Likewise. Marek diff --git gcc/intrinsics/access.c gcc/intrinsics/access.c index 65a0a10..0c18da0 100644 --- gcc/intrinsics/access.c +++ gcc/intrinsics/access.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include +#include #include #ifdef HAVE_UNISTD_H diff --git gcc/intrinsics/chdir.c gcc/intrinsics/chdir.c index 87419a8..193e482 100644 --- gcc/intrinsics/chdir.c +++ gcc/intrinsics/chdir.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include +#include #include #ifdef HAVE_UNISTD_H diff --git gcc/intrinsics/chmod.c gcc/intrinsics/chmod.c index c42fa8c..bdcb676 100644 --- gcc/intrinsics/chmod.c +++ gcc/intrinsics/chmod.c @@ -28,6 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined(HAVE_SYS_STAT_H) #include /* For memcpy. */ +#include /* For free. */ #include /* For stat, chmod and umask. */ diff --git gcc/intrinsics/link.c gcc/intrinsics/link.c index c6084a1..dd9c470 100644 --- gcc/intrinsics/link.c +++ gcc/intrinsics/link.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include +#include #include #ifdef HAVE_UNISTD_H diff --git gcc/intrinsics/perror.c gcc/intrinsics/perror.c index a8f0972..2bb1305 100644 --- gcc/intrinsics/perror.c +++ gcc/intrinsics/perror.c @@ -27,6 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include #include +#include /* SUBROUTINE PERROR(STRING) CHARACTER(len=*), INTENT(IN) :: STRING */ diff --git gcc/intrinsics/rename.c gcc/intrinsics/rename.c index aabf821..78c3d81 100644 --- gcc/intrinsics/rename.c +++ gcc/intrinsics/rename.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include +#include #include diff --git gcc/intrinsics/symlnk.c gcc/intrinsics/symlnk.c index 5c53cb7..52a3c4b 100644 --- gcc/intrinsics/symlnk.c +++ gcc/intrinsics/symlnk.c @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" #include +#include #include #ifdef HAVE_UNISTD_H diff --git gcc/intrinsics/unlink.c gcc/intrinsics/unlink.c index 2971a62..4752988 100644 --- gcc/intrinsics/unlink.c +++ gcc/intrinsics/unlink.c @@ -25,6 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libgfortran.h" +#include #include #include