mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* objtool crashes with some clang produced .o files
@ 2020-12-03 13:56 Arnd Bergmann
  2020-12-10 23:35 ` Nick Desaulniers
  0 siblings, 1 reply; 11+ messages in thread
From: Arnd Bergmann @ 2020-12-03 13:56 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Linux Kernel Mailing List,
	clang-built-linux

[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]

I see occasional randconfig builds failing on x86 with clang-11
and clang-12 when objtool crashes with a segmentation fault.

The simplest test case I managed to create is

$ echo "__SCK__tp_func_cdev_update() { __SCT__tp_func_cdev_update(); }" > file.c
$ clang-12 -c file.c -O2 -fno-asynchronous-unwind-tables
$ ./tools/objtool/objtool orc generate  file.o
Segmentation fault (core dumped)
$ clang-12 -S file.c -O2 -fno-asynchronous-unwind-tables -o-
.text
.file "file.c"
.globl __SCK__tp_func_cdev_update      # -- Begin function
__SCK__tp_func_cdev_update
.p2align 4, 0x90
.type __SCK__tp_func_cdev_update,@function
__SCK__tp_func_cdev_update:             # @__SCK__tp_func_cdev_update
# %bb.0:
xorl %eax, %eax
jmp __SCT__tp_func_cdev_update      # TAILCALL
.Lfunc_end0:
.size __SCK__tp_func_cdev_update, .Lfunc_end0-__SCK__tp_func_cdev_update
                                        # -- End function
.ident "Ubuntu clang version
12.0.0-++20201129052612+ce134da4b18-1~exp1~20201129163253.238"
.section ".note.GNU-stack","",@progbits
.addrsig

The behavior seems to depend on the specific symbol names, and it only happens
for the integrated assembler, not the GNU assembler.

Attaching both .o files for reference.

        Arnd

[-- Attachment #2: integrated-as.o --]
[-- Type: application/x-object, Size: 920 bytes --]

[-- Attachment #3: gnu-as.o --]
[-- Type: application/x-object, Size: 1184 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-12-14 12:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 13:56 objtool crashes with some clang produced .o files Arnd Bergmann
2020-12-10 23:35 ` Nick Desaulniers
2020-12-11  8:45   ` Peter Zijlstra
2020-12-11  9:32   ` Peter Zijlstra
2020-12-11 16:37     ` Josh Poimboeuf
2020-12-11 16:49       ` Peter Zijlstra
2020-12-11 17:46         ` Josh Poimboeuf
2020-12-11 20:57           ` Nick Desaulniers
2020-12-12  0:42             ` Nick Desaulniers
2020-12-12  0:47               ` Nick Desaulniers
2020-12-14 12:49               ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®