arch/mips/boot/compressed/../../../../lib/xz/xz_crc32.c:54: undefined reference to `__ubsan_handle_type_mismatch_v1'

From: kernel test robot
Date: Tue Jul 07 2020 - 11:28:25 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bfe91da29bfad9941d5d703d45e29f0812a20724
commit: 8d58f222e85f01da0c0e1fc1e77986c86de889e2 ubsan: disable UBSAN_ALIGNMENT under COMPILE_TEST
date: 9 weeks ago
config: mips-randconfig-r034-20200707 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 8d58f222e85f01da0c0e1fc1e77986c86de889e2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `xz_crc32':
>> arch/mips/boot/compressed/../../../../lib/xz/xz_crc32.c:54: undefined reference to `__ubsan_handle_type_mismatch_v1'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `lzma_len':
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:626: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:631: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `dec_vli':
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:187: undefined reference to `__ubsan_handle_shift_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `lzma_main':
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:740: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:741: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `lzma_literal_probs':
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:575: undefined reference to `__ubsan_handle_shift_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:576: undefined reference to `__ubsan_handle_shift_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:577: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `lzma_main':
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:744: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `lzma_match':
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:660: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:670: undefined reference to `__ubsan_handle_shift_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `rc_bittree_reverse':
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:545: undefined reference to `__ubsan_handle_shift_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `lzma_rep_match':
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:692: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:693: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:694: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:700: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:703: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `crc32_validate':
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:352: undefined reference to `__ubsan_handle_shift_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `xz_dec_lzma2_run':
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:979: undefined reference to `__ubsan_handle_load_invalid_value'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:997: undefined reference to `__ubsan_handle_load_invalid_value'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `memeq':
>> arch/mips/boot/compressed/../../../../lib/decompress_unxz.c:184: undefined reference to `__ubsan_handle_type_mismatch_v1'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `xz_crc32':
>> arch/mips/boot/compressed/../../../../lib/xz/xz_crc32.c:54: undefined reference to `__ubsan_handle_type_mismatch_v1'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `dec_block_header':
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:522: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:526: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:533: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:539: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `xz_crc32':
>> arch/mips/boot/compressed/../../../../lib/xz/xz_crc32.c:54: undefined reference to `__ubsan_handle_type_mismatch_v1'
>> mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_crc32.c:54: undefined reference to `__ubsan_handle_type_mismatch_v1'
>> mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_crc32.c:54: undefined reference to `__ubsan_handle_type_mismatch_v1'
>> mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_crc32.c:54: undefined reference to `__ubsan_handle_type_mismatch_v1'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `xz_dec_run':
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:775: undefined reference to `__ubsan_handle_load_invalid_value'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `xz_crc32':
>> arch/mips/boot/compressed/../../../../lib/xz/xz_crc32.c:54: undefined reference to `__ubsan_handle_type_mismatch_v1'
>> mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_crc32.c:54: undefined reference to `__ubsan_handle_type_mismatch_v1'
mipsel-linux-ld: arch/mips/boot/compressed/decompress.o: in function `xz_crc32_init':
arch/mips/boot/compressed/../../../../lib/xz/xz_crc32.c:43: undefined reference to `__ubsan_handle_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/../../../../lib/xz/xz_crc32.c:43: undefined reference to `__ubsan_handle_type_mismatch_v1'
mipsel-linux-ld: arch/mips/boot/compressed/ashldi3.o: in function `__ashldi3':
arch/mips/boot/compressed/ashldi3.c:22: undefined reference to `__ubsan_handle_shift_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/ashldi3.c:24: undefined reference to `__ubsan_handle_shift_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/ashldi3.c:26: undefined reference to `__ubsan_handle_shift_out_of_bounds'
mipsel-linux-ld: arch/mips/boot/compressed/ashldi3.c:27: undefined reference to `__ubsan_handle_shift_out_of_bounds'

vim +54 arch/mips/boot/compressed/../../../../lib/xz/xz_crc32.c

24fa0402a9b6a5 Lasse Collin 2011-01-12 48
24fa0402a9b6a5 Lasse Collin 2011-01-12 49 XZ_EXTERN uint32_t xz_crc32(const uint8_t *buf, size_t size, uint32_t crc)
24fa0402a9b6a5 Lasse Collin 2011-01-12 50 {
24fa0402a9b6a5 Lasse Collin 2011-01-12 51 crc = ~crc;
24fa0402a9b6a5 Lasse Collin 2011-01-12 52
24fa0402a9b6a5 Lasse Collin 2011-01-12 53 while (size != 0) {
24fa0402a9b6a5 Lasse Collin 2011-01-12 @54 crc = xz_crc32_table[*buf++ ^ (crc & 0xFF)] ^ (crc >> 8);

:::::: The code at line 54 was first introduced by commit
:::::: 24fa0402a9b6a537e87e38341e78b7da86486846 decompressors: add XZ decompressor module

:::::: TO: Lasse Collin <lasse.collin@xxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip