bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Andrei Matei <andreimatei1@gmail.com>, bpf <bpf@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>
Subject: Re: clang crash for target BPF
Date: Sun, 28 Feb 2021 20:27:15 -0800	[thread overview]
Message-ID: <cc9defee-dcd8-5b06-7396-213599651752@fb.com> (raw)
In-Reply-To: <747ea282-d158-f65f-65ac-c13dac694974@gmail.com>



On 2/28/21 2:14 PM, Andrei Matei wrote:
> Hello,
> 
> I've encountered an assertion failure / crash on clang master 
> (5de09ef02e24) as well as the older version 11. Happens for "-target 
> bpf", not otherwise.
> I've reported it to clang but there's been no response so far. Alexei, I 
> believe you've invited me to raise the issue here.
> clang bugzilla: 
> https://bugs.llvm.org/show_bug.cgi?id=48578 
> 
> 
> The repro program and instructions are in the bug report above.
> The assertion failure reads:
> 
> clang: 
> /home/andrei/src/llvm-project/llvm/lib/CodeGen/LiveVariables.cpp:130: 
> void llvm::LiveVariables::HandleVirtRegUse(llvm::Register, 
> llvm::MachineBasicBlock*, llvm::MachineInstr&): Assertion 
> `MRI->getVRegDef(Reg) && "Register use before def!"' failed.
> PLEASE submit a bug report to 
> https://bugs.llvm.org/  
> and include the crash backtrace, preprocessed source, and associated run 
> script.
> Stack dump:
> 0.      Program arguments: bin/clang -O2 -target bpf -c -o probe.bpf.o 
> /home/andrei/Downloads/probe.bpf.preprocessed.c
> 1.      <eof> parser at end of file
> 2.      Code generation
> 3.      Running pass 'Function Pass Manager' on module 
> '/home/andrei/Downloads/probe.bpf.preprocessed.c'.
> 4.      Running pass 'Live Variable Analysis' on function '@probe'

Andrei, Thanks for reporting. I can reproduce with latest llvm trunk.
Will take a look and comment in the above bugzilla report whenever
I find anything. Thanks again!

> 
> 
> Thanks!
> 

      reply	other threads:[~2021-03-01  4:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CABWLset0aqju=tkCVQJ3p8QyVwFUi21HkfxBS3rK7qC5oScyWw@mail.gmail.com>
2021-02-28 22:14 ` clang crash for target BPF Andrei Matei
2021-03-01  4:27   ` Yonghong Song [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cc9defee-dcd8-5b06-7396-213599651752@fb.com \
    --to=yhs@fb.com \
    --cc=andreimatei1@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).