[LLVMbugs] [Bug 18901] New: function not returning declared value cause crash

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 19 12:00:05 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18901

            Bug ID: 18901
           Summary: function not returning declared value cause crash
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mlesoinne at cmsoftinc.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I know of this bug which is pretty much the same:
http://llvm.org/bugs/show_bug.cgi?id=17375
It's been declared resolved invalid but really it is an issue.
Here is my code demonstrating the issue. Could not be shorter:

int func()
{
}
int main()
{
func();
return 0;
}

Crashes with illegal instruction when compiled with clang++
It passes with clang. (the file name I used was test.c with lowercase c)

I was bitten by this using Lua. This is code I do not write. If I use a library
that does not do return, I should not have my code crash.
I think this bug is fully alive and important and not "resolved invalid"

-- 
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/20140219/efc25d1a/attachment.html>


More information about the llvm-bugs mailing list