<div dir="ltr">Awesome - was able to reduce this to a debug info quality (in cases where we don't tickle UB enough to crash) more consistently fixed it inĀ <span style="color:rgb(0,0,0)">r219210. Thanks again for your patience/help.<br><br>The assertion now fires on a few test cases that it didn't before - but I suspect that might just be some wrinkles from Adrian or Duncan's recent schema changes, so I'll try bisecting to see when they regressed (since the test cases are old and passed when I last tried to apply the assertions).<br><br>Thanks again,<br><br>- David</span></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 6, 2014 at 2:16 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Aha, this asserts on both Windows and Linux.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 6, 2014 at 11:50 AM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Mon, Oct 6, 2014 at 11:39 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">That would be mighty unfortunate... :/ Perhaps we can find some assertions to put in to stabilize the failure, though I haven't a clue what they'd be just yet.<br></div></blockquote><div><br></div></span><div>I'm staring at the .ll file diff, trying to figure out what went wrong. There are several small differences, and I wonder if they are for things like order of evaluation, where the only difference is a use-list order change.</div><span><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Yep, that test case doesn't produce an assertion for me. Crud. What's a useful way for me to debug this on a Windows machine? Am I just going to have to sit with you/someone - or can I get remote access somehow (from Linux, ideally?)?</div></blockquote><div><br></div></span><div>Most Windows remote access solutions tend to take over the primary screen, unless you have some server OS variant, so if you want to debug it directly you'd want to rig up a local VM. This is doable, there are gwindows images you can fetch, but I'll let you know why I give up over here. :)</div><div><br></div><div>Here's the function we assert on:</div><div><pre style="color:rgb(0,0,0)">; Function Attrs: noreturn nounwind
define internal void @"\01??$assert_cast@PAVRedeclarableTemplateDecl@clang@@@@YAPAVRedeclarableTemplateDecl@clang@@ZZ"() #4 {
entry:
  tail call void @"\01?llvm_unreachable_internal@llvm@@YAXPBD0I@Z"(i8* getelementptr inbounds ([16 x i8]* @"\01??_C@_0BA@OELEAIJA@bad?5assert_cast?$AA@", i32 0, i32 0), i8* getelementptr inbounds ([51 x i8]* @"\01??_C@_0DD@BABLEMGH@?4?4?2tools?2clang?2lib?2Serialization@", i32 0, i32 0), i32 2108) #12, !dbg !34160
  unreachable, !dbg !34160
}</pre></div><div>There are no diffs in the code, but here's some related debug info that is suspiciously different:</div><div><pre style="color:rgb(0,0,0)">-!1590 = metadata !{metadata !"0x2e\00assert_cast<clang::NamespaceDecl *>\00assert_cast<clang::NamespaceDecl *>\00\002107\001\001\000\000\00256\001\002107", metadata !13, metadata !14, metadata !7, null, void ()* @"\01??$assert_cast@PAVRedeclarableTemplateDecl@clang@@@@YAPAVRedeclarableTemplateDecl@clang@@ZZ", null, null, metadata !2}
+!1590 = metadata !{metadata !"0x2e\00assert_cast<clang::NamespaceDecl *>\00assert_cast<clang::NamespaceDecl *>\00\002107\001\001\000\000\00256\001\002107", metadata !13, metadata !14, metadata !7, null, null, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 2107] [local] [def] [assert_cast<clang::NamespaceDecl *>]</pre></div><div>Thoughts?</div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>