From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 61DFE3858D3C; Tue, 19 Apr 2022 19:15:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61DFE3858D3C From: "jason at zx2c4 dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug plugins/105171] gcc/toplev.c: `local_tick` can overflow and become -1 Date: Tue, 19 Apr 2022 19:15:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: plugins X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: patch X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at zx2c4 dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX 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: Tue, 19 Apr 2022 19:15:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105171 --- Comment #23 from Jason A. Donenfeld --- The output of crc32_string() is always >0 for that case (I think?). And the case where the user passes an explicit "0" to -frandom-seed was already considered to be "disabled" by the prior code. A 0 seed also plunges that plugin's lfsr into the trivial linear subspace, rendering it inoperable. So= all things considered, 0 is a reasonable "off" value for us to use. There might= be some room for improvement -- starting with this bug report here -- but thin= gs seem fine enough as-is (plus, the bikeshedding in this bug report already doesn't make that road too appealing).=