The tool may move an array to an BPF MAP. In this case, the array is changed into a pointer to the MAP address. If the user had used the address-of operator (&) somewhere on the array, the code will be incorrect. It is because the semantic of & operator on an array or on a pointer is a bit different.
The tool may move an array to an BPF MAP. In this case, the array is changed into a pointer to the MAP address. If the user had used the
address-of
operator (&
) somewhere on the array, the code will be incorrect. It is because the semantic of&
operator on an array or on a pointer is a bit different.Example:
will be converted to (which is wrong)