<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 7, 2015, at 6:59 PM, Douglas Katzman <<a href="mailto:dougk@google.com" class="">dougk@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><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">Do you happen to have a testcase handy?<br class=""></blockquote><div class=""><br class=""></div><div class="">The sanitizers on Linux comprise a test case it seems - they started failing with this commit.</div><div class=""><a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/20647" class="">http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/20647</a> </div><div class=""><br class=""></div><div class="">Without my understanding this code in the least, if you just do what the assertion says to do (as here), it fixes the sanitizers:</div><div class=""><div class=""><br class=""></div><div class="">diff --git a/lib/Target/X86/X86FrameLowering.cpp b/lib/Target/X86/X86FrameLowering.cpp</div><div class="">index 7f05e5b..d85b6a8 100644</div><div class="">--- a/lib/Target/X86/X86FrameLowering.cpp</div><div class="">+++ b/lib/Target/X86/X86FrameLowering.cpp</div><div class="">@@ -384,8 +384,9 @@ void X86FrameLowering::BuildCFI(MachineBasicBlock &MBB,</div><div class="">                                 MCCFIInstruction CFIInst) const {</div><div class="">   MachineFunction &MF = *MBB.getParent();</div><div class="">   unsigned CFIIndex = MF.getMMI().addFrameInst(CFIInst);</div><div class="">-  BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION))</div><div class="">-      .addCFIIndex(CFIIndex);</div><div class="">+  MachineInstrBuilder MIB = BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION));</div><div class="">+  MIB.addCFIIndex(CFIIndex);</div><div class="">+  MIB->setFlag(MachineInstr::FrameSetup);</div><div class=""> } </div></div></div></div></div>
</div></blockquote><br class=""></div><div>This will fix the assert, but I think it is conceptually wrong. FrameSetup is supposed to describe the prologue. This will insert this flag on instructions all over the function. I can’t think of any bad consequences though. CC:ing some other people with debug info knowledge.</div><div><br class=""></div><div>Fred</div><br class=""></body></html>