[LLVMbugs] [Bug 4223] New: Improper handling of "undef" type in simplifycfg
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun May 17 19:00:48 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4223
Summary: Improper handling of "undef" type in simplifycfg
Product: new-bugs
Version: unspecified
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: viridia at gmail.com
CC: llvmbugs at cs.uiuc.edu
It seems that variables whose value is "undef" aren't being handled correctly
in a number of places. When I pass the following *invalid* code to LLVM, I
would expect LLVM to detect the error in the 4th instruction (the store to
undef):
define %2 @"throwSomething()"() {
entry:
%0 = call %tart.core.Exception* @tart.core.Exception.type.alloc()
; <%tart.core.Exception*> [#uses=2]
%construct = call %2
@"tart.core.Exception.construct()"(%tart.core.Exception* %0) ;
<%2> [#uses=0]
%1 = bitcast %tart.core.Exception* %0 to %3* ; <%3*>
[#uses=2]
store %3* %1, %3** undef
%2 = getelementptr %3* %1, i32 0, i32 1 ; <%4*> [#uses=1]
%throw = call i32 @_Unwind_RaiseException(%4* %2) ; <i32>
[#uses=0]
unreachable
}
However, that is not what is happening.
The simplifycfg pass appears to fail silently on this line - that is, it
doesn't report an error, but neither does it generate any code from the 4th
line on. The resulting function contains only the instructions before the
"store", and the rest is just chopped off.
The function verifier pass did not report any error either when it ran on this
function either.
--
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