From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 05AD3385840F; Mon, 13 Dec 2021 10:44:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05AD3385840F From: "hubicka at kam dot mff.cuni.cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/103652] Producing profile with -O2 -flto and trying to consume it with -O3 -flto leads to ICEs on indirect call profiling Date: Mon, 13 Dec 2021 10:44:02 +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: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at kam dot mff.cuni.cz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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: Mon, 13 Dec 2021 10:44:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103652 --- Comment #4 from hubicka at kam dot mff.cuni.cz --- >=20 > Well, I'm specifically speaking about: > error: the control flow of function =E2=80=98BZ2_compressBlock=E2=80=99 d= oes not match its > profile data (counter =E2=80=98arcs=E2=80=99)=20 >=20 > this type of errors should not happen even in a multi-threaded programs. There are some cases where I see even those on clang build - I am not sure how that happens (if it is configury difference or generated code or gcc bug) It is on my TODO to analyse... In any case we should never ICE on malformed gcda files. Especially not by buffer overflow :) >=20 > > I think you can produce testcase easily by making a function with one > > indirect call for train run and many indirect calls in profile-use run. > >=20 > > I have patch to avoid the buffer overflow - can send it after getting to > > office. >=20 > Sure, please send it. Attached. Honza=