shift exponent 32 is too large for 32-bit
Closed this issue · 3 comments
Hi!
First, thanks so much for your work! I've been able to use my usb tp-link in every linux distro.
Anyway, i'm now using linuxmint 21.1 + kernel 5.15.0-58, compiled as your instructions, and also added DKMS.
While everything worked with no errors, this keeps appearing on journal:
================================================================================
kernel: UBSAN: shift-out-of-bounds in /var/lib/dkms/rtl8852au/1.15.0.1/build/phl/hal_g6/phy/bb/halbb_interface.c:136:40
kernel: shift exponent 32 is too large for 32-bit type 'unsigned int'
kernel: ================================================================================
Is anything i can do?
That warning is probably harmless, but I pushed a fix that should take care of it. This change is untested. If it causes failures, let me know.
Thanks a bunch! The error is gone, and so far so good. If something arises, i'll let you know.
Cheers!
The underlying mistake was in the routine that calculates the shift to reach the low-order bit of a mask. It worked fine as long as the mask waas not zero. My patch just checks for the mask of zero, and returns a shift of zero in that case.