You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://github.com/gnuradio/volk/blob/main/lib/qa_utils.cc#L54 Contains: float int_max = float(uint64_t(2) << (type.size * 8));. If type.size is 8, then int_max = uint64_t(2) << 64. Shift a 64-bit number by 64 is undefined behavior. It appears that gcc masks the shift amount and no shift is performed. Thus the random numbers generated are between 0 and 2 for unsigned 64-bit numbers and -1 and 1 for signed 64-bit numbers.
This is not ideal and causes some tests to not actually exercise algorithm. See #605
The text was updated successfully, but these errors were encountered:
https://github.com/gnuradio/volk/blob/main/lib/qa_utils.cc#L54 Contains:
float int_max = float(uint64_t(2) << (type.size * 8));
. Iftype.size
is 8, thenint_max = uint64_t(2) << 64
. Shift a 64-bit number by 64 is undefined behavior. It appears that gcc masks the shift amount and no shift is performed. Thus the random numbers generated are between 0 and 2 for unsigned 64-bit numbers and -1 and 1 for signed 64-bit numbers.This is not ideal and causes some tests to not actually exercise algorithm. See #605
The text was updated successfully, but these errors were encountered: