From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 89C393858D28; Tue, 20 Jun 2023 15:46:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 89C393858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687275993; bh=+/pZ58xA59y8wWBdhfbb9ReoxJSqs1/LXxMhR+Jg7cw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yPgv6ZdXeZqPGE9UiUJDpmaNGCAhtCsOJ9nEizcgikVnPFt2yxnj1iZEeea6cHsKY 3nvCR3nslpWmSWCWAOJmaUGVuwNG4ScCE4+vzmvgK9DDzsLjkJlxwn1uqCifoIS3MJ TZhhFBx4AnskeX6R/3tNZKKiYTZnhFHblU19J+7o= From: "xry111 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/110172] Leak false positives from -fanalyzer with -fexceptions (even on C code) Date: Tue, 20 Jun 2023 15:46:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xry111 at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110172 --- Comment #4 from Xi Ruoyao --- (In reply to Jonathan Wakely from comment #3) > I mentioned that on IRC. I'm not sure glibc can even handle exceptions fr= om > those functions. Is that supported at all? Does printf clean up its own > allocations and locks in that case? IMHO it should be UB for printf_funct= ion > to exit via an exception. They compile vfprintf.c with -fexceptions, so it looks like they are at lea= st attempting to make it work. And if they don't want to support it at all, t= hey should've use __nothrow attribute or noexcept(true) for vfprintf then we wouldn't see the warning.=