NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-mips/60780 (UBSan complains about left-shifting outside of int type range)



    Date:        Sun, 4 Oct 2026 18:51:38 +0200
    From:        Alexander Schreiber <als%thangorodrim.ch@localhost>
    Message-ID:  <asKEGjZEnL3Q11ak%mordor.angband.thangorodrim.de@localhost>

  | just built and booted from HEAD/20261002154359Z and during bootup there
  | is one remaining UBSan complaint about integer shifting on the EdgeRouter4:
  |
  | [     1.000000] UBSan: Undefined Behavior in /usr/build/HEAD_20261002154359Z/usr/src/sys/lib/libkern/../../../common/lib/libc/string/memset2.c:104:15, left shift of 4294967295 by 32 places cannot be represented in type 'long int'

This one is an easy fix (I believe) - I am testing a build now.

The data type is (according to the comments) intended to be unsigned,
but it is relying upon __register_t being unsigned to achieve that.
That may once have been a valid assumption (I have no idea) but it
certainly is not any more.

kre




Home | Main Index | Thread Index | Old Index