https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94747
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to AK from comment #0) > Integer overflow reported by asan with the following stack trace. asan?! Are you sure? As Jakub says, this is probably the dumb "unsigned-integer-overflow" sanitizer, which is dumb because unsigned integers can't overflow by definition (they wrap) and because that wrapping is never undefined. The code is fine.