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

            Bug ID: 43163
           Summary: Calling main() not identified as undefined behavior
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: jeff.lina...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

// ubtest.cpp
int main() {main();}

Compiling with "clang++ -fsanitize=undefined ubtest.cpp -o ubtest.exe"

In C++ calling main() is UB so I'd expect UBSan to immediately detect the nasal
demons invoked but this actually stack overflows after 250 calls on Ubuntu.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to