((uint64_t)-1) may be undefined
Mate Soos write:
"Undefined behaviour sanitizer is giving me a bug in M4RI and it's usually a good idea to fix these, undefined behaviour is... undefined. Here:
/usr/local/include/m4ri/mzd.h:582:3: runtime error: negation of 1 cannot be
represented in type 'word' (aka 'unsigned long')
The line of code is:
static inline void mzd_write_bit(mzd_t *M, rci_t const row, rci_t const col, BIT const
value) {
__M4RI_WRITE_BIT(M->rows[row][col/m4ri_radix], col%m4ri_radix, value);
}
"
Comments (8)
-
-
reporter Nope, this is exactly how I'd expect you to call it :) Will need to fix the undefined behaviour thing.
-
:) By the way, I just built it with ASAN+UBSAN and it gave this right away so once it's fixed it's easy to check that it's good :)
-
reporter Can you try with the current master, should be fixed now.
-
I have been fuzzing CMS with this change for a couple of days now, it seems fine :) So there is a good chance that no bug has been introduced, and the original issue is definitely gone :) Thanks!
-
Isn’t this resolved, then?
-
It is, I think! But only @malb can close it Martin, wanna go ahead and close it?
-
reporter - changed status to resolved
:)
- Log in to comment
Here is how I use it:
I think that should be OK? If not, I am happy to change it of course, but I think a lot of people are likely to use it this way?