[llvm-bugs] [Bug 46340] New: Null dereference when generating module summary index with alias-to-ifunc

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 15 23:48:01 PDT 2020


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

            Bug ID: 46340
           Summary: Null dereference when generating module summary index
                    with alias-to-ifunc
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Global Analyses
          Assignee: unassignedbugs at nondot.org
          Reporter: itay.bookstein at nextsilicon.com
                CC: llvm-bugs at lists.llvm.org

Compiling the following piece of code works fine, but crashes with a
null-dereference segfault when passing -flto:

static void foo_impl(void) {}
static void *foo_ifunc(void) { return &foo_impl; }
extern void foo(void) __attribute__((ifunc("foo_ifunc")));
extern __typeof(foo) foo2 __attribute__((alias("foo")));

The null-dereference is due to GlobalAlias::getBaseObject returning nullptr
when the aliasee is a GlobalIFunc, and it happens specifically in
ModuleSummaryAnalysis.cpp function computeAliasSummary.

-- 
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/20200616/bcc7a9d3/attachment.html>


More information about the llvm-bugs mailing list