From patchwork Thu Jan 11 19:59:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 859285 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-470880-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="QzHt6f/h"; 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 3zHcCh5tB0z9t20 for ; Fri, 12 Jan 2018 06:59:27 +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 :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=RM37wtd2HOHb2g11ObjSwKT7+B2Fm7ezRppQI4LqnLOGnc U3CgqBTppS3YeDy0gBz/KWy9a7ECGxOX3zg5sSMR//RJBmSKoV2HW29ARzA8ttll 8ZD7MCTBsEA96vvF5mRaZv53+QxRVqEQGB9JxO4AnagXpoR0lkbXmCbIeGEAI= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=PwoYEOhtiHdEOjC/pxcKt832+94=; b=QzHt6f/hSxW2lHVU0kaZ srCIysw9SSedBl0xmmfkX4fDPLzpYd8IEfmmfisQuJnyClaAoXaIxXNavWjlloHQ d+9/un+b27TU6g0DxMQY6I4p9ZHFwhc5QmSC/0y7cAM6HeSVczfzUTOWvrBg0Gvd VqO0LV8OG5VZ8EUapoZXCXk= Received: (qmail 66061 invoked by alias); 11 Jan 2018 19:59:21 -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 66018 invoked by uid 89); 11 Jan 2018 19:59:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1549, 256474 X-HELO: mail-wm0-f44.google.com Received: from mail-wm0-f44.google.com (HELO mail-wm0-f44.google.com) (74.125.82.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Jan 2018 19:59:19 +0000 Received: by mail-wm0-f44.google.com with SMTP id f140so7625968wmd.2 for ; Thu, 11 Jan 2018 11:59:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/ujNLPmYBvzOrgBcqie9QMBCzsCFtHaiQuXaLuBhvCA=; b=CJUPzwNa302nvksV0tyYqWTjFlVpUPjxwRBQL5MrCJjXzm6ZYCjSExzFw85JVKFviB 3wDRZXHJ0U9sh93COeMU4qMSlMbSwd7Qi1jwebUE6UgjMFqZtCpMHb55LiSCnrcKOe8I XHDsNIzn9E7JOBKtzs8Pbq6bMV7DDTo1odM0wdDE/ijzW4pLuVcouQ6yW3WCno9n8FbN 15qb8ZDjiIh9pKpLQBq5pwRlD1Bd6YcsaMWg2imTLVKqbnfgHYT9GQZ68k21evGRGwgR OX1pOisixIq9a2pt7W7KiIgbOaueECVkL/YcL4k0VW9wmkxM6y1vjocpTt5Hqe0edvYw T9RA== X-Gm-Message-State: AKGB3mKw4TzNWB+D4JbKImEMjD36W/fow82N4iIdRDiT4mhUkNNDnX2M dokmE9ehgt76hNwPqMlRVEhvhuVPhYQ4pRyf4TEc6w== X-Google-Smtp-Source: ACJfBovB8Qz7atvA6FPOUJOaqULseiPHrPIsFHXjTusz6W3s1Gsm/eWlBh01gWZwVCnij0EqqIMYQ2dmgJhtXxv+nZ0= X-Received: by 10.80.212.9 with SMTP id t9mr31670827edh.28.1515700757186; Thu, 11 Jan 2018 11:59:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.179.221 with HTTP; Thu, 11 Jan 2018 11:59:16 -0800 (PST) From: Ian Lance Taylor Date: Thu, 11 Jan 2018 11:59:16 -0800 Message-ID: Subject: libgo patch committed: Don't loop endlessly if we can't parse notes To: gcc-patches , gofrontend-dev@googlegroups.com This libgo patch avoids an endless loop in a cgo test if we can parse the notes. Thanks to Richi for identifying the problem. This may be the cause of GCC PR 83794. Bootstrapped and ran cgo tests on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 256474) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -1176dd2b53f2d2b826b599a126f3f9828283cec3 +fe8481db9f5b37eb9a0c329673789eaaf1335598 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/misc/cgo/test/buildid_linux.go =================================================================== --- libgo/misc/cgo/test/buildid_linux.go (revision 256366) +++ libgo/misc/cgo/test/buildid_linux.go (working copy) @@ -27,6 +27,7 @@ func testBuildID(t *testing.T) { defer f.Close() c := 0 +sections: for i, s := range f.Sections { if s.Type != elf.SHT_NOTE { continue @@ -47,7 +48,7 @@ func testBuildID(t *testing.T) { if len(d) < 12 { t.Logf("note section %d too short (%d < 12)", i, len(d)) - continue + continue sections } namesz := f.ByteOrder.Uint32(d) @@ -59,7 +60,7 @@ func testBuildID(t *testing.T) { if int(12+an+ad) > len(d) { t.Logf("note section %d too short for header (%d < 12 + align(%d,4) + align(%d,4))", i, len(d), namesz, descsz) - continue + continue sections } // 3 == NT_GNU_BUILD_ID