From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DECA43985C2F; Thu, 29 Oct 2020 15:00:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DECA43985C2F From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/97461] [11 Regression] allocate_gcov_kvp() deadlocks in firefox LTO+PGO build (overridden malloc() recursion) Date: Thu, 29 Oct 2020 15:00:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 15:00:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97461 --- Comment #16 from Martin Li=C5=A1ka --- (In reply to Sergei Trofimovich from comment #15) > allocate_gcov_kvp() gets called 89 times. Tried as: All right, it's quite close to what we have. So can you please test the following patch: diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index 4e95c7c82ee..a899a02b765 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -293,7 +293,7 @@ GCOV_COUNTERS #define GCOV_TOPN_MAXIMUM_TRACKED_VALUES 32 /* Number of pre-allocated gcov_kvp structures. */ -#define GCOV_PREALLOCATED_KVP 64 +#define GCOV_PREALLOCATED_KVP 128 /* Convert a counter index to a tag. */ #define GCOV_TAG_FOR_COUNTER(COUNT) \=