Den mån 2 sep. 2024 kl 10:59 skrev hahahahacker2009
<hahahahacker2...@gmail.com>:
>
> Hello,
> I can compile the GENERIC kernel without any error. But
> compiling a custom kernel with option KUBSAN failed with this error:
>
> /usr/src/sys/dev/pci/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c:1854:13:
> error: stack frame size (2120) exceeds limit (2047) in
> 'DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation'
> [-Werror,-Wframe-larger-than]
> static void 
> DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation(

A quick guess is that the KUBSAN adds stuff to the stack frame when
calling subroutines, and this makes these files exceed the limit of
2047 bytes. When compiling kernel code, the OpenBSD Makefiles add both
-Werror (make every warning a hard error) and -Wframe-larger-than=2047
which turns any call with a stack frame larger than 2k to issue a
warning.

Bumping the warning to a larger number or compiling these files
without KUBSAN would probably make the compile progress.

-- 
May the most significant bit of your life be positive.

Reply via email to