All of lore.kernel.org
 help / color / mirror / Atom feed
* [kees:devel/overflow/signed-sanitizer 26/27] lib/test_ubsan.c:62:16: sparse: sparse: cast truncates bits from constant value (7fffffffffffffff becomes ffffffff)
@ 2024-02-09  4:32 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-09  4:32 UTC (permalink / raw)
  To: Kees Cook; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git devel/overflow/signed-sanitizer
head:   fdc16607cd55a37f5d4924c47f1642047c4ea1e1
commit: 3a9f6e016a76d7c3535f9d410dbae01561bb4916 [26/27] [WIP] Enable -fsanitize=implicit-signed-integer-truncation
config: powerpc64-randconfig-r113-20240208 (https://download.01.org/0day-ci/archive/20240209/202402091220.ApBO5EdE-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240209/202402091220.ApBO5EdE-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402091220.ApBO5EdE-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/test_ubsan.c:62:16: sparse: sparse: cast truncates bits from constant value (7fffffffffffffff becomes ffffffff)
   lib/test_ubsan.c:72:18: sparse: sparse: shift count is negative (-1)

vim +62 lib/test_ubsan.c

    55	
    56	static void test_ubsan_truncate_signed(void)
    57	{
    58		volatile long val = LONG_MAX;
    59		volatile int val2 = 0;
    60	
    61		UBSAN_TEST(CONFIG_UBSAN_SIGNED_WRAP);
  > 62		val2 = val;
    63	}
    64	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-09  4:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-09  4:32 [kees:devel/overflow/signed-sanitizer 26/27] lib/test_ubsan.c:62:16: sparse: sparse: cast truncates bits from constant value (7fffffffffffffff becomes ffffffff) kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.