Closed Quuxplusone closed 14 years ago
Is this still a problem on mainline?
Yes, I can reproduce this with mainline. The problem is this module level
metadata:
!7 = metadata !{i32 524340, i32 0, metadata !1, metadata !"outFileName",
metadata !"outFileName", metadata !"", metadata !1, i32 14, metadata !8, i1
true, i1 true, i8** %outFileName} ; [ DW_TAG_variable ]
which has i8** %outFileName, which is not allowed.
It seems like the verifier doesn't fully verify metadata, since it didn't
complain :(
Whats going on here is that there is a module level piece of metadata that
has an internal global variable as an operand. So far so good. GlobalOpt
sees that this global variable is only used by one function and turns it
into a local variable of the function. This results in a global metadata
with an AllocaInst as an operand, which is not allowed.
I'm not sure what the right solution to this problem is.
By the way, I've enhanced the verifier to catch this kind of problem, but
didn't commit it because it breaks llvm-gcc bootstrap (same problem as in
this PR).
Attached md.ll
(199 bytes, text/plain): reduced testcase .ll
Ug, this is a really terrible problem. Pondering on it. Thank you *very* much
for the reduction + analysis, Duncan.
Fixed here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20100426/100501.html
CallbackVH to the rescue :-)
md.ll
(199 bytes, text/plain)