[llvm-bugs] [Bug 52196] New: Using -fsanitize=undefined with -static segfault the binary

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 17 00:36:07 PDT 2021


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

            Bug ID: 52196
           Summary: Using  -fsanitize=undefined with -static segfault the
                    binary
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: ubsan
          Assignee: unassignedbugs at nondot.org
          Reporter: sylvestre at debian.org
                CC: llvm-bugs at lists.llvm.org

With

-- foo.cpp --
int main() {
        return 0;
}

$ clang-14 -static -fsanitize=undefined foo.cpp -lstdc++ && ./a.out
segmentation fault  ./a.out


With gcc
$ gcc-10 -static -fsanitize=undefined foo.cpp -lstdc++ && ./a.out && echo $?
0

-- 
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/20211017/d9c570fa/attachment.html>


More information about the llvm-bugs mailing list