Skip to content

CONFIG_UBSAN_TRAP build failures #1213

Description

@nathanchance
$ make -skj"$(nproc)" ARCH=s390 CC=clang CROSS_COMPILE=s390x-linux-gnu- O=out distclean allmodconfig vmlinux
s390x-linux-gnu-ld: init/main.o: in function `trace_event_raw_event_initcall_level':
/tmp/s390-ubsan-bisect/out/../include/trace/events/initcall.h:10: undefined reference to `__ubsan_handle_add_overflow'
s390x-linux-gnu-ld: /tmp/s390-ubsan-bisect/out/../include/trace/events/initcall.h:10: undefined reference to `__ubsan_handle_add_overflow'
s390x-linux-gnu-ld: init/main.o: in function `trace_event_get_offsets_initcall_level':
/tmp/s390-ubsan-bisect/out/../include/trace/events/initcall.h:10: undefined reference to `__ubsan_handle_add_overflow'
s390x-linux-gnu-ld: init/main.o: in function `setup_boot_config':
/tmp/s390-ubsan-bisect/out/../init/main.c:394: undefined reference to `__ubsan_handle_add_overflow'
s390x-linux-gnu-ld: /tmp/s390-ubsan-bisect/out/../init/main.c:393: undefined reference to `__ubsan_handle_sub_overflow'
s390x-linux-gnu-ld: /tmp/s390-ubsan-bisect/out/../init/main.c:447: undefined reference to `__ubsan_handle_add_overflow'
s390x-linux-gnu-ld: init/main.o: in function `setup_command_line':
/tmp/s390-ubsan-bisect/out/../init/main.c:625: undefined reference to `__ubsan_handle_add_overflow'
s390x-linux-gnu-ld: /tmp/s390-ubsan-bisect/out/../init/main.c:625: undefined reference to `__ubsan_handle_add_overflow'
s390x-linux-gnu-ld: /tmp/s390-ubsan-bisect/out/../init/main.c:627: undefined reference to `__ubsan_handle_add_overflow'
s390x-linux-gnu-ld: /tmp/s390-ubsan-bisect/out/../init/main.c:623: undefined reference to `__ubsan_handle_add_overflow'
...

Presumably caused/exposed by https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=186c3e18dba3f035b73149f6356f8c1c439288f4 because the issue is not present if I explicitly disabled CONFIG_UBSAN_SANITIZE_ALL. I do not see any issue with GCC 10.2.0.

cc @kees @uweigand

Metadata

Metadata

Assignees

No one assigned

    Labels

    [ARCH] s390This bug impacts ARCH=s390[BUG] linuxA bug that should be fixed in the mainline kernel.[Regression] linuxThis was previously working, but the kernel has regressed.low priorityThis bug is not critical and not a priority

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions