[llvm] r249522 - [X86] Emit .cfi_escape GNU_ARGS_SIZE when adjusting the stack before calls
Frédéric Riss via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 20:13:45 PDT 2015
> On Oct 7, 2015, at 6:59 PM, Douglas Katzman <dougk at google.com> wrote:
>
> Do you happen to have a testcase handy?
>
> The sanitizers on Linux comprise a test case it seems - they started failing with this commit.
> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/20647 <http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/20647>
>
> Without my understanding this code in the least, if you just do what the assertion says to do (as here), it fixes the sanitizers:
>
> diff --git a/lib/Target/X86/X86FrameLowering.cpp b/lib/Target/X86/X86FrameLowering.cpp
> index 7f05e5b..d85b6a8 100644
> --- a/lib/Target/X86/X86FrameLowering.cpp
> +++ b/lib/Target/X86/X86FrameLowering.cpp
> @@ -384,8 +384,9 @@ void X86FrameLowering::BuildCFI(MachineBasicBlock &MBB,
> MCCFIInstruction CFIInst) const {
> MachineFunction &MF = *MBB.getParent();
> unsigned CFIIndex = MF.getMMI().addFrameInst(CFIInst);
> - BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION))
> - .addCFIIndex(CFIIndex);
> + MachineInstrBuilder MIB = BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION));
> + MIB.addCFIIndex(CFIIndex);
> + MIB->setFlag(MachineInstr::FrameSetup);
> }
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.
Fred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151007/87e0bfa7/attachment.html>
More information about the llvm-commits
mailing list