[Bug target/94417] New: -fcf-protection -mcmodel=large is broken

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 30 23:37:33 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94417

            Bug ID: 94417
           Summary: -fcf-protection -mcmodel=large is broken
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---
            Target: x86-64

From:

https://bugs.llvm.org/show_bug.cgi?id=45364

Testcase:

void ext();
__attribute((noinline)) static void a() { ext(); }
void b() { a(); }

Compile with "gcc -O2 -mcmodel=large -fcf-protection".  Note the indirect
call to "a", which does not have an endbr64.


More information about the Gcc-bugs mailing list