[llvm-bugs] [Bug 31700] New: always_inline is stronger than sanitize/no_sanitize mismatch

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 19 14:23:40 PST 2017


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

            Bug ID: 31700
           Summary: always_inline is stronger than sanitize/no_sanitize
                    mismatch
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: eugeni.stepanov at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Inlining is disabled for functions with different sets of no_sanitize
attributes, because that could lead to either over- or under-sanitizing the
code, and it not clear which is better in general (and sometimes both are
wrong).

Apparently, always_inline attribute is stronger than that.
In the following example, f is inlined into g when build with -O3
-fsanitize=memory.

int sink;

__attribute__((always_inline, no_sanitize("memory")))
void f() {
  sink = 1;
}

void g() {
  f();
}

-- 
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/20170119/652a1220/attachment.html>


More information about the llvm-bugs mailing list