[llvm-bugs] [Bug 42791] New: [BPF] fix typedef issue for offset relocation

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jul 27 08:56:20 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42791

            Bug ID: 42791
           Summary: [BPF] fix typedef issue for offset relocation
           Product: new-bugs
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ys114321 at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Currently, the CO-RE offset relocation does not work
if any struct/union member or array element is a typedef.
For example,

typedef const int arr_t[7];
struct input {
    arr_t a;
};
func(...) {
     struct input *in = ...;
     ... __builtin_preserve_access_index(&in->a[1]) ...
}

The BPF backend calculated default offset is 0 while
4 is the correct answer. Similar issues exist for struct/union
typedef's.

Current implementation does not handle typedef properly.

-- 
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/20190727/b452e812/attachment.html>


More information about the llvm-bugs mailing list