From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7C474388A83D; Sun, 14 Jun 2020 15:38:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C474388A83D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592149113; bh=qg42x1x+KGgGrUh5pS47s7Xw6A62jJOy0G3QvmWDBN4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iliAaaLrCYt9DhNzqGy069eiMxpUx07np5dThq+rQTSKuVxaNUoJPa+UzNRaRmXnr YpbcwQAY6wpla0UTJg3EHLsRAuzjEdVxWd3/Dzrsuo3rovJ5CD5K4Lv39UViocDpNs 1OnxliMCFg9wdTk00iMHqnIt4qIhe9hWfRGy/W7E= From: "ro at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/93492] Broken code with -fpatchable-function-entry and -fcf-protection=full Date: Sun, 14 Jun 2020 15:38:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: patch, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc resolution bug_status 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: Sun, 14 Jun 2020 15:38:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93492 Rainer Orth changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ro at gcc dot gnu.org Resolution|FIXED |--- Status|RESOLVED |REOPENED --- Comment #20 from Rainer Orth --- Several of the new testcases FAIL in various configurations: * On i386-pc-solaris2.11 with the native assembler (both 32 and 64-bit): +FAIL: gcc.target/i386/pr93492-2.c scan-assembler \\t.cfi_startproc\\n\\tendbr(32|64)\\n.*.LPFE1:\\n\\tnop\\n\\tret\\n +FAIL: gcc.target/i386/pr93492-3.c scan-assembler \\t.cfi_startproc\\n\\tendbr(32|64)\\n.*.LPFE1:\\n\\tnop\\n1:\\tcall\\t__fe= ntry__\\n\\tret\\n +FAIL: gcc.target/i386/pr93492-4.c scan-assembler \\t.cfi_startproc\\n.*.LPFE1:\\n\\tnop\\n\\tret\\n +FAIL: gcc.target/i386/pr93492-5.c scan-assembler \\t.cfi_startproc\\n.*.LPFE1:\\n\\tnop\\n1:\\tcall\\t__fentry__\\n\\tret\\n Please note that while /bin/as *does* accept .cfi_* directives, gcc doesn= 't emit them because there are bugs in as' support. * On i386-pc-solaris2.11 with gas (both 32 and 64-bit): +FAIL: gcc.target/i386/pr93492-3.c scan-assembler \\t.cfi_startproc\\n\\tendbr(32|64)\\n.*.LPFE1:\\n\\tnop\\n1:\\tcall\\t__fe= ntry__\\n\\tret\\n +FAIL: gcc.target/i386/pr93492-5.c scan-assembler \\t.cfi_startproc\\n.*.LPFE1:\\n\\tnop\\n1:\\tcall\\t__fentry__\\n\\tret\\n E.g. the 32-bit pr93492-3.s has .cfi_startproc .data .align 4 .LP0: .long 0 .text endbr32 .section __patchable_function_entries,"aw",@progbits .align 4 .long .LPFE1 .text .LPFE1: nop movl $.LP0,%edx 1: call __fentry__ pushl %ebp .cfi_def_cfa_offset 8 .cfi_offset 5, -8 movl %esp, %ebp .cfi_def_cfa_register 5 popl %ebp .cfi_restore 5 .cfi_def_cfa 4, 4 ret * On x86_64-apple-darwin11.4.2 (both 32 and 64-bit): FAIL: gcc.target/i386/pr93492-1.c check-function-bodies f10_endbr FAIL: gcc.target/i386/pr93492-1.c check-function-bodies f10_none FAIL: gcc.target/i386/pr93492-1.c check-function-bodies f11_endbr FAIL: gcc.target/i386/pr93492-1.c check-function-bodies f11_none FAIL: gcc.target/i386/pr93492-1.c check-function-bodies f21_endbr FAIL: gcc.target/i386/pr93492-1.c check-function-bodies f21_none FAIL: gcc.target/i386/pr93492-2.c scan-assembler \\t.cfi_startproc\\n\\tendbr(32|64)\\n.*.LPFE1:\\n\\tnop\\n\\tret\\n FAIL: gcc.target/i386/pr93492-4.c scan-assembler \\t.cfi_startproc\\n.*.LPFE1:\\n\\tnop\\n\\tret\\n=