public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Nick Desaulniers <ndesaulniers@google.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: kernel test robot <lkp@intel.com>,
	Alexander Lobakin <alexandr.lobakin@intel.com>,
	<llvm@lists.linux.dev>, <oe-kbuild-all@lists.linux.dev>,
	<linux-kernel@vger.kernel.org>, Yury Norov <yury.norov@gmail.com>
Subject: Re: lib/test_bitmap.c:920:2: error: call to '__compiletime_assert_239' declared with 'error' attribute: BUILD_BUG_ON failed: !__builtin_constant_p(res)
Date: Fri, 16 Jun 2023 16:03:21 +0200	[thread overview]
Message-ID: <67508559-0bcd-46ff-b040-59bcb41b0a9a@intel.com> (raw)
In-Reply-To: <CAKwvOd=uqfnyw2u=Nhm+Q0uGORjW9GB+pso6tb_HKGSU0rhZBQ@mail.gmail.com>

From: Nick Desaulniers <ndesaulniers@google.com>
Date: Thu, 15 Jun 2023 16:48:22 -0400

> On Thu, Jun 15, 2023 at 3:52 PM Nick Desaulniers
> <ndesaulniers@google.com> wrote:
>>
>> On Thu, Jun 15, 2023 at 7:22 AM Andy Shevchenko
>> <andriy.shevchenko@linux.intel.com> wrote:

[...]

>>>>    896                bitmap_clear(bitmap, 0, BITS_PER_LONG);
>>>>    897        #if defined(__s390__) && defined(__clang__)
>>>>    898                if (!const_test_bit(7, bitmap))
>>>>    899        #else
>>>>    900                if (!test_bit(7, bitmap))
>>>>    901        #endif
>>>
>>> Hmm... Reveals the bug in clang/arm64?
>>
>> Seems related to the config.  ARCH=arm64 defconfig +
>> CONFIG_TEST_BITMAP=y doesn't trigger this for me, but the randconfig
>> does.  We'll bisect the config, and update the thread tracking this:
>> https://github.com/ClangBuiltLinux/linux/issues/1874
> 
> KASAN and GCOV together seem to be tickling this.

Thanks for root-causing this!
Should I prepare a patch which would work around KASAN + GCOV here or
you're digging the Clang sources for potential issues?

> 
>>
>>>
>>>>    919                res = !test_bit(18, &bitopvar);
>>>>  > 920                BUILD_BUG_ON(!__builtin_constant_p(res));
>>>>    921                BUILD_BUG_ON(!res);
>>>
>>>
>>> --
>>> With Best Regards,
>>> Andy Shevchenko
>>>
>>>
>>>
>>
>>
>> --
>> Thanks,
>> ~Nick Desaulniers
> 
> 
> 

Thanks,
Olek

      reply	other threads:[~2023-06-16 14:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15  6:32 lib/test_bitmap.c:920:2: error: call to '__compiletime_assert_239' declared with 'error' attribute: BUILD_BUG_ON failed: !__builtin_constant_p(res) kernel test robot
2023-06-15 11:22 ` Andy Shevchenko
2023-06-15 19:52   ` Nick Desaulniers
2023-06-15 20:48     ` Nick Desaulniers
2023-06-16 14:03       ` Alexander Lobakin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67508559-0bcd-46ff-b040-59bcb41b0a9a@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=alexandr.lobakin@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=ndesaulniers@google.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yury.norov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox