-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined Behaviour in volk_8u_x4_conv_k7_r2_8u #674
Comments
Thanks for finding this issue. Bugs in the FEC decoder code are a nightmare because or test infrastructure is unsuitable for this kernel. Not directly related to the bug at hand, but: |
It looks like it will not be possible to avoid Undefined Behaviour in this kernel without changing the API. Decisions are returned as an array of The decisions are packed bits. I think storing them in |
UBSAN reports undefined behaviour in this code:
volk/kernels/volk/volk_8u_x4_conv_k7_r2_8u.h
Lines 112 to 113 in 42f57cd
Here
w
is anunsigned int[2]
, and thes * (sizeof(decision_t) / sizeof(unsigned int))
calculation intentionally reaches outside the bounds of the array to access thes
th element of the outerdecision_t
arrayd
.It looks like this hack became necessary because
sizeof(decision_t)
is 8, and yet it is marked as being 16-byte aligned; because of this, accessingd[1]
(or any other odd offset) fails due to misalignment. I suspect that the 16-byte alignment ofdecision_t
is incorrect or unnecessary.The text was updated successfully, but these errors were encountered: