UBSAN: array-index-out-of-bounds complaints in newer kernels

I should note that this warning is harmless. It’s due to the wrong size being declared on some arrays in UVM. You can see it in the code here: https://github.com/NVIDIA/open-gpu-kernel-modules/blob/main/kernel-open/nvidia-uvm/uvm_pmm_gpu.c#L224

These are C “flexible array members” and should just be declared with no size.

2 Likes