[LLVMbugs] [Bug 8844] New: Infinite loop and stack overflow in SemaExpr when compiling erroneous C++
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Dec 22 06:29:20 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=8844
Summary: Infinite loop and stack overflow in SemaExpr when
compiling erroneous C++
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: devlists at shadowlab.org
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Created an attachment (id=5920)
--> (http://llvm.org/bugs/attachment.cgi?id=5920)
Some C++ code
When compiling the attached sample, clang crash.
This is due to an infinite recursion in SemaExpr.cpp, line 3818.
-------
// Recurse as an -> access.
IsArrow = true;
return LookupMemberExpr(R, BaseExpr, IsArrow, OpLoc, SS,
ObjCImpDecl, HasTemplateArgs);
-------
Unfortunately, IsArrow is already true, so it try again with the same
parameters, fall in the same error handler, try again, and so on until it
crashes.
>clang++ --version
clang version 2.9 (trunk 122393)
Target: x86_64-apple-darwin10
Thread model: posix
> clang++ -fsyntax-only Test.cpp
Test.cpp:12:21: error: member reference type 'const Sapphire::FormatDescription
*' is not a pointer; maybe you meant to use '.'?
[…]
fatal error: too many errors emitted, stopping now [-ferror-limit=]
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list