Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prevent rewriting for array element type
Fix issue iovisor#2352. Corresponding llvm bug: https://bugs.llvm.org/show_bug.cgi?id=41918. If the element type is array type, the rewriter may generate code like addr = ({ typeof(__u8 [16]) _val; __builtin_memset(&_val, 0, sizeof(_val)); bpf_probe_read(&_val, sizeof(_val), (u64)&daddr->s6_addr); _val; }) for something like addr = daddr->s6_addr; where s6_addr is an array. The above code has an issue then as addr is pointing to some data which is out of scope, which meaning compiler is free to use the space. Let us disable such transformation until we find a good solution. Signed-off-by: Yonghong Song <[email protected]>
- Loading branch information