[llvm-bugs] [Bug 39317] New: BPF target: r11 leaks to generated code on array access in a loop using volatile index
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 16 02:53:34 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=39317
Bug ID: 39317
Summary: BPF target: r11 leaks to generated code on array
access in a loop using volatile index
Product: new-bugs
Version: 6.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: elazarg at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 21010
--> https://bugs.llvm.org/attachment.cgi?id=21010&action=edit
zip file with bitcode, llvm-disassembly, bpf-disassembly, object file and
source C file
Running on a source code very similar to bug #39316, llc emits invalid code
that uses the nonexistent register r1. This register seems to be used for
internal manipulations in the backend, but should not be exposed in the BPF
code.
(The usage also does not make sense because it reads from an uninitialized
register, and then writes to an unused register)
To reproduce, run
$ llc-6.0 -march=bpf -filetype=obj bug_r11.bc
To see the bug, run
$ llvm-objdump-6.0 -S bug_r11.o
...
11: bf b1 00 00 00 00 00 00 r1 = r11
...
LBB0_3:
21: bf 1b 00 00 00 00 00 00 r11 = r1
...
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181016/1553ab81/attachment.html>
More information about the llvm-bugs
mailing list