* arch/mips/boot/compressed/decompress.c:undefined reference to `__ashldi3'
@ 2026-09-30 16:36 kernel test robot
2026-09-30 19:01 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2026-09-30 16:36 UTC (permalink / raw)
To: Josh Law
Cc: oe-kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 551c722f40809618230001baccf219193e22fc5a
commit: d4dba3b9c03a326cfa73833d6b166aeb442f82b5 lib: decompress_bunzip2: fix 32-bit shift undefined behavior
date: 6 months ago
config: mips-randconfig-r2300-20260930 (https://download.01.org/0day-ci/archive/20260930/202609301826.MFaFMsmd-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 15.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260930/202609301826.MFaFMsmd-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
| Fixes: d4dba3b9c03a ("lib: decompress_bunzip2: fix 32-bit shift undefined behavior")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609301826.MFaFMsmd-lkp@intel.com/
All errors (new ones prefixed by >>):
mips-linux-ld: arch/mips/boot/compressed/decompress.o: in function `get_bits':
>> arch/mips/boot/compressed/decompress.c:(.text+0xf4): undefined reference to `__ashldi3'
>> mips-linux-ld: arch/mips/boot/compressed/decompress.c:(.text+0x168): undefined reference to `__ashldi3'
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: arch/mips/boot/compressed/decompress.c:undefined reference to `__ashldi3'
2026-09-30 16:36 arch/mips/boot/compressed/decompress.c:undefined reference to `__ashldi3' kernel test robot
@ 2026-09-30 19:01 ` Andrew Morton
2026-09-30 19:11 ` Bradley Morgan
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2026-09-30 19:01 UTC (permalink / raw)
To: kernel test robot
Cc: Josh Law, oe-kbuild-all, linux-kernel,
Linux Memory Management List, linux-mips, Bradley Morgan
On Wed, 30 Sep 2026 18:36:50 +0200 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 551c722f40809618230001baccf219193e22fc5a
> commit: d4dba3b9c03a326cfa73833d6b166aeb442f82b5 lib: decompress_bunzip2: fix 32-bit shift undefined behavior
> date: 6 months ago
> config: mips-randconfig-r2300-20260930 (https://download.01.org/0day-ci/archive/20260930/202609301826.MFaFMsmd-lkp@intel.com/config)
> compiler: mips-linux-gcc (GCC) 15.2.0
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260930/202609301826.MFaFMsmd-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
> | Fixes: d4dba3b9c03a ("lib: decompress_bunzip2: fix 32-bit shift undefined behavior")
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202609301826.MFaFMsmd-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> mips-linux-ld: arch/mips/boot/compressed/decompress.o: in function `get_bits':
> >> arch/mips/boot/compressed/decompress.c:(.text+0xf4): undefined reference to `__ashldi3'
> >> mips-linux-ld: arch/mips/boot/compressed/decompress.c:(.text+0x168): undefined reference to `__ashldi3'
I dunno, I'd be suspecting a toolchain issue here?
--- a/lib/decompress_bunzip2.c
+++ b/lib/decompress_bunzip2.c
@@ -135,7 +135,7 @@ static unsigned int INIT get_bits(struct bunzip_data *bd, char bits_wanted)
}
/* Avoid 32-bit overflow (dump bit buffer to top of output) */
if (bd->inbufBitCount >= 24) {
- bits = bd->inbufBits&((1 << bd->inbufBitCount)-1);
+ bits = bd->inbufBits & ((1ULL << bd->inbufBitCount) - 1);
bits_wanted -= bd->inbufBitCount;
bits <<= bits_wanted;
bd->inbufBitCount = 0;
@@ -146,7 +146,7 @@ static unsigned int INIT get_bits(struct bunzip_data *bd, char bits_wanted)
}
/* Calculate result */
bd->inbufBitCount -= bits_wanted;
- bits |= (bd->inbufBits >> bd->inbufBitCount)&((1 << bits_wanted)-1);
+ bits |= (bd->inbufBits >> bd->inbufBitCount) & ((1ULL << bits_wanted) - 1);
return bits;
}
32-bit MIPS should be able to do this?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: arch/mips/boot/compressed/decompress.c:undefined reference to `__ashldi3'
2026-09-30 19:01 ` Andrew Morton
@ 2026-09-30 19:11 ` Bradley Morgan
0 siblings, 0 replies; 4+ messages in thread
From: Bradley Morgan @ 2026-09-30 19:11 UTC (permalink / raw)
To: Andrew Morton, kernel test robot
Cc: Josh Law, oe-kbuild-all, linux-kernel,
Linux Memory Management List, linux-mips
On 30 September 2026 20:01:59 BST, Andrew Morton
<akpm@linux-foundation.org> wrote:
>On Wed, 30 Sep 2026 18:36:50 +0200 kernel test robot <lkp@intel.com>
>wrote:
>
>> tree:
>https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: 551c722f40809618230001baccf219193e22fc5a
>> commit: d4dba3b9c03a326cfa73833d6b166aeb442f82b5 lib:
>decompress_bunzip2: fix 32-bit shift undefined behavior
>> date: 6 months ago
>> config: mips-randconfig-r2300-20260930
>(https://download.01.org/0day-ci/archive/20260930/202609301826.MFaFMsmd-lkp@intel.com/config)
>> compiler: mips-linux-gcc (GCC) 15.2.0
>> sparse: v0.6.5-rc1
>> reproduce (this is a W=1 build):
>(https://download.01.org/0day-ci/archive/20260930/202609301826.MFaFMsmd-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
>> | Fixes: d4dba3b9c03a ("lib: decompress_bunzip2: fix 32-bit shift
>undefined behavior")
>> | Reported-by: kernel test robot <lkp@intel.com>
>> | Closes:
>https://lore.kernel.org/oe-kbuild-all/202609301826.MFaFMsmd-lkp@intel.com/
>>
>> All errors (new ones prefixed by >>):
>>
>> mips-linux-ld: arch/mips/boot/compressed/decompress.o: in function
>`get_bits':
>> >> arch/mips/boot/compressed/decompress.c:(.text+0xf4): undefined
>reference to `__ashldi3'
>> >> mips-linux-ld: arch/mips/boot/compressed/decompress.c:(.text+0x168):
>undefined reference to `__ashldi3'
>
>I dunno, I'd be suspecting a toolchain issue here?
>
>--- a/lib/decompress_bunzip2.c
>+++ b/lib/decompress_bunzip2.c
>@@ -135,7 +135,7 @@ static unsigned int INIT get_bits(struct bunzip_data *bd, char bits_wanted)
> }
> /* Avoid 32-bit overflow (dump bit buffer to top of output) */
> if (bd->inbufBitCount >= 24) {
>- bits = bd->inbufBits&((1 << bd->inbufBitCount)-1);
>+ bits = bd->inbufBits & ((1ULL << bd->inbufBitCount) - 1);
> bits_wanted -= bd->inbufBitCount;
> bits <<= bits_wanted;
> bd->inbufBitCount = 0;
>@@ -146,7 +146,7 @@ static unsigned int INIT get_bits(struct bunzip_data *bd, char bits_wanted)
> }
> /* Calculate result */
> bd->inbufBitCount -= bits_wanted;
>- bits |= (bd->inbufBits >> bd->inbufBitCount)&((1 << bits_wanted)-1);
>+ bits |= (bd->inbufBits >> bd->inbufBitCount) & ((1ULL << bits_wanted) - 1);
>
> return bits;
> }
>
>32-bit MIPS should be able to do this?
May I ask why I got CCed in this..??
--- Thanks!
"I'm not a very positive person" - Linus torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* arch/mips/boot/compressed/decompress.c:undefined reference to `__ashldi3'
@ 2026-07-24 13:33 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-07-24 13:33 UTC (permalink / raw)
To: Josh Law
Cc: oe-kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4539944e515183668109bdf4d0c3d7d228383d88
commit: d4dba3b9c03a326cfa73833d6b166aeb442f82b5 lib: decompress_bunzip2: fix 32-bit shift undefined behavior
date: 4 months ago
config: mips-randconfig-r134-20260724 (https://download.01.org/0day-ci/archive/20260724/202607242144.ZsfAPGBh-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260724/202607242144.ZsfAPGBh-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
| Fixes: d4dba3b9c03a ("lib: decompress_bunzip2: fix 32-bit shift undefined behavior")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607242144.ZsfAPGBh-lkp@intel.com/
All errors (new ones prefixed by >>):
mips-linux-ld: arch/mips/boot/compressed/decompress.o: in function `$L13':
>> arch/mips/boot/compressed/decompress.c:(.text+0xfc): undefined reference to `__ashldi3'
mips-linux-ld: arch/mips/boot/compressed/decompress.o: in function `$L12':
arch/mips/boot/compressed/decompress.c:(.text+0x168): undefined reference to `__ashldi3'
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-30 19:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30 16:36 arch/mips/boot/compressed/decompress.c:undefined reference to `__ashldi3' kernel test robot
2026-09-30 19:01 ` Andrew Morton
2026-09-30 19:11 ` Bradley Morgan
-- strict thread matches above, loose matches on Subject: below --
2026-07-24 13:33 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®