From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 04B98385841D; Fri, 14 Apr 2023 03:10:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04B98385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681441828; bh=H8M37LxLhtI3E+qJaok17pZIq68TBWDhCBbolTPCMJw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DXVfcYfNtWkppW1BtWwMoH3EH+AYpmrg7KL5XY96ad+V4WyL5SbvrczPYZv+633TM ig7ie8r0V+XgpghdE60cvWTc0Z6YcTyZLChUI7v5sfzS2U//Pu9d5/W/FgoEo0SMMS rXrkMkV6WlkwWkvqiqO6BG10GyHfpJOxe1G5FwXg= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/108722] gcc.dg/analyzer/file-CWE-1341-example.c fails on power 9 BE Date: Fri, 14 Apr 2023 03:10:26 +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: testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D108722 --- Comment #3 from CVS Commits --- The master branch has been updated by Jiu Fu Guo : https://gcc.gnu.org/g:edc6659c97c4a747123b1150b372dc8e7a83a824 commit r13-7176-gedc6659c97c4a747123b1150b372dc8e7a83a824 Author: Jiufu Guo Date: Wed Apr 12 10:12:58 2023 +0800 testsuite: filter out warning noise for CWE-1341 test The case file-CWE-1341-example.c checkes [CWE-1341](`double-fclose`). While on some systems, besides [CWE-1341], a message of [CWE-415] is also reported. On those systems, attribute `malloc` may be attached on fopen: ``` # 258 "/usr/include/stdio.h" 3 4 extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1)))= ; or say: __attribute_malloc__ __attr_dealloc_fclose __wur; ``` See (PR analyzer/108722) for future fix in the analyzer. This workaround patch adds -Wno-analyzer-double-free to this case. gcc/testsuite/ChangeLog: PR analyzer/108722 * gcc.dg/analyzer/file-CWE-1341-example.c: Update.=