Re: [PATCH, bpf-llvm] Fix bug on silently truncating 64-bit immediate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Oct 2017 06:21:30 -0400
Jiong Wang <jiong.wang@xxxxxxxxxxxxx> wrote:

> We came across an llvm bug when compiling some testcases that 64-bit
> immediates are silently truncated into 32-bit and then packed into
> BPF_JMP | BPF_K encoding.  This caused comparison with wrong value.

I think you send this to the wrong mailing list... this looks like a
patch against the LLVM source code.

Shouldn't you send to: llvm-dev@xxxxxxxxxxxxxx ?
 
> This bug looks to be introduced by r308080.  

This looks like a very recent change:
  https://llvm.org/viewvc/llvm-project?view=revision&revision=308080
  Sat Jul 15 05:41:42 2017 UTC (2 months, 4 weeks ago)

(As you are sending this to a user mailing list: xdp-newbies@xxxxxxxxxxxxxxx)

I want to know if this have made it into a LLVM release? and which release?

As the git-repo[1] replica of LLVM SVN-repo does not git-tag the
releases, I could not answer this question myself via the command:

$ git describe --contains 7c423e0690

[1] http://llvm.org/git/llvm.git

> The Select_Ri pattern is
> supposed to be lowered into J*_Ri while the latter only support 32-bit
> immediate encoding, therefore Select_Ri should have similar immediate
> predicate check as what J*_Ri are doing.
> 
> Reported-by: Jakub Kicinski <jakub.kicinski@xxxxxxxxxxxxx>
> Signed-off-by: Jiong Wang <jiong.wang@xxxxxxxxxxxxx>
> ---
>  lib/Target/BPF/BPFISelLowering.cpp |  8 ++++++--
>  lib/Target/BPF/BPFInstrInfo.td     |  2 +-
>  test/CodeGen/BPF/select_ri.ll      | 35 +++++++++++++++++++++++++++++++++++
>  3 files changed, 42 insertions(+), 3 deletions(-)

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer



[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux