lkml.org 
[lkml]   [2018]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] ubsan: don't mark __ubsan_handle_builtin_unreachable as noreturn
    From
    Date


    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

    > Arnd
    >

    \
     
     \ /
      Last update: 2018-02-05 11:31    [W:3.297 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site