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
Got an UBSan error report from Address Sanitizer when running it upon core_test.
/ws/nano-node/nano/node/xorshift.hpp:18:12: runtime error: left shift of 3860899979500397099 by 31 places cannot be represented in type 'uint64_t' (aka 'unsigned long')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /ws/nano-node/nano/node/xorshift.hpp:18:12 in
The overflow is expected as part of the calculation, but this should ideally not trigger an error.
Code portion from which the complain comes from:
class xorshift1024star final
{
public:
std::array<uint64_t, 16> s;
unsigned p{ 0 };
uint64_t next ()
{
auto p_l (p);
auto pn ((p_l + 1) & 15);
p = pn;
uint64_t s0 = s[p_l];
uint64_t s1 = s[pn];
s1 ^= s1 << 31; // a
s1 ^= s1 >> 11; // b
s0 ^= s0 >> 30; // c
return (s[pn] = s0 ^ s1) * 1181783497276652981LL;
}
};
OS: Ubuntu 20.04
The text was updated successfully, but these errors were encountered:
Got an UBSan error report from Address Sanitizer when running it upon core_test.
The overflow is expected as part of the calculation, but this should ideally not trigger an error.
Code portion from which the complain comes from:
OS: Ubuntu 20.04
The text was updated successfully, but these errors were encountered: