[llvm-bugs] [Bug 44096] New: Need a way to disable CFG on individual functions

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Nov 20 16:17:55 PST 2019


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

            Bug ID: 44096
           Summary: Need a way to disable CFG on individual functions
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dmajor at mozilla.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    rnk at google.com

For certain functions, CFG should be disabled, for example a typical 32-bit
detour interceptor that calls into the second instruction of its hooked
function.

I believe the MSVC-ism for this is __declspec(guard(nocf)) but that isn't
implemented in clang-cl. I also tried __attribute__((nocf_check)) but got this
warning: 

warning: 'nocf_check' attribute ignored; use -fcf-protection to enable the
attribute [-Wignored-attributes]

I could add -fcf-protection as the message suggests, but I'm not sure that's
the right solution.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191121/89dcc548/attachment.html>


More information about the llvm-bugs mailing list