From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5292 invoked by alias); 4 Nov 2013 12:15:19 -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 5283 invoked by uid 89); 4 Nov 2013 12:15:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RDNS_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: dub0-omc4-s17.dub0.hotmail.com Received: from Unknown (HELO dub0-omc4-s17.dub0.hotmail.com) (157.55.2.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Nov 2013 12:15:18 +0000 Received: from DUB122-W7 ([157.55.2.73]) by dub0-omc4-s17.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 4 Nov 2013 04:15:10 -0800 X-TMN: [dZ1F8B3KF3MIqaakkxIpICrJ7/aEwW7l] Message-ID: From: Bernd Edlinger To: Jakub Jelinek CC: Dodji Seketeli , "gcc-patches@gcc.gnu.org" Subject: RE: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals Date: Mon, 04 Nov 2013 12:32:00 -0000 In-Reply-To: <20131104120636.GP27813@tucnak.zalov.cz> References: ,<20131031144309.GR27813@tucnak.zalov.cz>,<87y559xz7y.fsf@redhat.com>,<20131031173649.GW27813@tucnak.zalov.cz>,<87r4awtmnx.fsf@redhat.com>,,<20131104120636.GP27813@tucnak.zalov.cz> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg00203.txt.bz2 > > On Mon, Nov 04, 2013 at 12:59:49PM +0100, Bernd Edlinger wrote: >> I see another "read_line" at gcov.c, which seems to be a copy. > > Copy of what? gcov.c read_line hardly can be allowed to fail because out = of > mem unlike this one for caret diagnostics. > Though, surely, this one could be somewhat adjusted so that it really > doesn't use a temporary buffer but reads directly into the initially > malloced, then realloced, buffer. But, if we want it to eventually switch > to caching the caret diagnostics, it won't be possible/desirable anymore. > > Jakub gcov.c and input.c currently both have a static function "read_line" they are currently 100% in sync. Both _can_ fail, if the file gets deleted or modified while the function executes. If gcov.c crashes in that event, I'd call it a bug. Bernd.=20=09=09=20=09=20=20=20=09=09=20=20