Re: [linux-next:master 7012/7430] include/linux/compiler_types.h:328:38: error: call to '__compiletime_assert_183' declared with attribute error: unexpected size in kmalloc_index()

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

 



On 6/7/21 2:25 PM, Hyeonggon Yoo wrote:
> On Mon, Jun 07, 2021 at 01:40:02PM +0200, Vlastimil Babka wrote:
>> On 6/6/21 1:08 PM, Hyeonggon Yoo wrote:
>> > On Sat, Jun 05, 2021 at 02:10:46PM +0800, kernel test robot wrote:
>> >> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>> >> head:   ccc252d2e818f6a479441119ad453c3ce7c7c461
>> >> commit: a7ba988ff9de37f0961b4bf96d17aca73d0d2e25 [7012/7430] mm, slub: change run-time assertion in kmalloc_index() to compile-time
>> >> config: parisc-randconfig-r014-20210604 (attached as .config)
>> >> compiler: hppa-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
>> >>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a7ba988ff9de37f0961b4bf96d17aca73d0d2e25
>> >>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>> >>         git fetch --no-tags linux-next master
>> >>         git checkout a7ba988ff9de37f0961b4bf96d17aca73d0d2e25
>> >>         # save the attached .config to linux build tree
>> >>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc 
>> >> 
>> >> If you fix the issue, kindly add following tag as appropriate
>> >> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>> >> 
>> >> All errors (new ones prefixed by >>):
>> >>    In file included from <command-line>:
>> >>    In function 'kmalloc_index',
>> >>        inlined from 'kmalloc_node' at include/linux/slab.h:572:20,
>> >>        inlined from 'bpf_map_kmalloc_node.isra.0.part.0' at include/linux/bpf.h:1319:9:
>> >> >> include/linux/compiler_types.h:328:38: error: call to '__compiletime_assert_183' declared with attribute error: unexpected size in kmalloc_index()
>> >>      328 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>> >>          |                                      ^
>> >>    include/linux/compiler_types.h:309:4: note: in definition of macro '__compiletime_assert'
>> >>      309 |    prefix ## suffix();    \
>> >>          |    ^~~~~~
>> >>    include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
>> >>      328 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>> >>          |  ^~~~~~~~~~~~~~~~~~~
>> >>    include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
>> >>       39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>> >>          |                                     ^~~~~~~~~~~~~~~~~~
>> >>    include/linux/slab.h:389:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
>> >>      389 |  BUILD_BUG_ON_MSG(1, "unexpected size in kmalloc_index()");
>> >>          |  ^~~~~~~~~~~~~~~~
>> > 
>> > Reproduce with attached config, and read the code.
>> > It has no problem in clang (clang-10/clang-11). it is problem with gcc.
>> 
>> But what exactly is the gcc problem here?
>> Did you have to reproduce it with specific gcc version and/or architecture?
>> 
> 
> Before replying, I should say that I'm not an expert on gcc.
> I just tried some ways to fix the error, and it seemed to me that
> gcc is doing something wrong.

I'm involving my gcc colleagues, will report results...




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux