All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Olof Johansson <olof@lixom.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Nicolas Pitre <nico@linaro.org>, Andi Kleen <ak@linux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ubsan: don't mark __ubsan_handle_builtin_unreachable as noreturn
Date: Wed, 7 Nov 2018 17:44:27 +0300	[thread overview]
Message-ID: <cca8985f-8279-7bd8-3ebe-f2f79cd98b91@virtuozzo.com> (raw)
In-Reply-To: <CAOesGMi-vkYPDrL2drJ70zf3_xTMWrsfPoW68TkiRJCj8uWBLg@mail.gmail.com>



On 11/03/2018 12:27 AM, Olof Johansson wrote:
> On Mon, Feb 5, 2018 at 2:31 AM Andrey Ryabinin <aryabinin@virtuozzo.com> wrote:
>>
>> On 02/05/2018 01:15 PM, Arnd Bergmann wrote:
>>> On Mon, Feb 5, 2018 at 10:02 AM, Andrey Ryabinin
>>> <aryabinin@virtuozzo.com> wrote:
>>>>
>>>>
>>>> On 02/02/2018 06:47 PM, Arnd Bergmann wrote:
>>>>> gcc-8 complains about the prototype for this function:
>>>>>
>>>>> lib/ubsan.c:432:1: error: ignoring attribute 'noreturn' in declaration of a built-in function '__ubsan_handle_builtin_unreachable' because it conflicts with attribute 'const' [-Werror=attributes]
>>>>>
>>>>
>>>> That's actually a bug in GCC. In GCC __ubsan_handle_builtin_unreachable declared
>>>> with 'noreturn' and 'const' attributes:
>>>>
>>>> DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_BUILTIN_UNREACHABLE,
>>>>                       "__ubsan_handle_builtin_unreachable",
>>>>                       BT_FN_VOID_PTR,
>>>>                       ATTR_COLD_CONST_NORETURN_NOTHROW_LEAF_LIST)
>>>>
>>>>
>>>> But const attribute doesn't make any sense for function that returns void or doesn't return at all.
>>>> Given that gcc-8 has not released yet, it would be better to fix this bug there.
>>>
>>> Ok. Should I open a gcc bug, or will you take care of it?
>>>
>>
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84210
> 
> 8.2.0 still shows this, and there's been no movement on that bug. How
> about we pick up this patch until it's been resolved?
> 

Sure, I'll add info about GCC bug in changelog and resend the patch.

> 
> -Olof
> 

  reply	other threads:[~2018-11-07 14:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02 15:47 [PATCH] ubsan: don't mark __ubsan_handle_builtin_unreachable as noreturn Arnd Bergmann
2018-02-05  9:02 ` Andrey Ryabinin
2018-02-05 10:15   ` Arnd Bergmann
2018-02-05 10:31     ` Andrey Ryabinin
2018-11-02 21:27       ` Olof Johansson
2018-11-07 14:44         ` Andrey Ryabinin [this message]
2018-11-07 14:45         ` [PATCH v2] " Andrey Ryabinin
2018-11-07 16:23           ` Olof Johansson
2018-11-07 20:55           ` Andrew Morton
2018-11-07 21:44             ` Arnd Bergmann

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=cca8985f-8279-7bd8-3ebe-f2f79cd98b91@virtuozzo.com \
    --to=aryabinin@virtuozzo.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@linaro.org \
    --cc=olof@lixom.net \
    --cc=sfr@canb.auug.org.au \
    /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 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.