Skip to content

Instantly share code, notes, and snippets.

@takoeight0821

takoeight0821/foo.s

Created Aug 31, 2019
Embed
What would you like to do?
Arch Linuxでclang -c foo.sでこれコンパイルするとclangがセグフォする
.intel_syntax noprefix
.text
not:
ret
f:
call not
ret
# 以下ログ
# Stack dump:
# 0. Program arguments: /usr/bin/clang-8 -cc1as -triple x86_64-pc-linux-gnu -filetype obj -main-file-name foo.s -target-cpu x86-64 -fdebug-compilation-dir /vagrant/tmp -dwarf-debug-producer clang version 8.0.1 (tags/RELEASE_801/final) -dwarf-version=4 -mrelocation-model pic -o foo.o foo.s
# #0 0x00007f2047df1f8b llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/bin/../lib/libLLVM-8.so+0xa1bf8b)
# #1 0x00007f2047deff24 llvm::sys::RunSignalHandlers() (/usr/bin/../lib/libLLVM-8.so+0xa19f24)
# #2 0x00007f2047df00b6 (/usr/bin/../lib/libLLVM-8.so+0xa1a0b6)
# #3 0x00007f20462be7e0 __restore_rt (/usr/bin/../lib/libc.so.6+0x3a7e0)
# #4 0x00007f20463e5dc4 __memmove_avx_unaligned_erms (/usr/bin/../lib/libc.so.6+0x161dc4)
# #5 0x00007f2047d7f67d llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) (/usr/bin/../lib/libLLVM-8.so+0x9a967d)
# #6 0x00007f204a2511c0 (/usr/bin/../lib/libLLVM-8.so+0x2e7b1c0)
# #7 0x00007f204a25fab1 (/usr/bin/../lib/libLLVM-8.so+0x2e89ab1)
# #8 0x00007f2049185cdb (/usr/bin/../lib/libLLVM-8.so+0x1dafcdb)
# #9 0x00007f204918967e (/usr/bin/../lib/libLLVM-8.so+0x1db367e)
# #10 0x00005635d8730a0e cc1as_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang-8+0x19a0e)
# #11 0x00005635d8725144 main (/usr/bin/clang-8+0xe144)
# #12 0x00007f20462aaee3 __libc_start_main (/usr/bin/../lib/libc.so.6+0x26ee3)
# #13 0x00005635d872659e _start (/usr/bin/clang-8+0xf59e)
# clang-8: error: unable to execute command: Segmentation fault (core dumped)
# clang-8: error: clang integrated assembler command failed due to signal (use -v to see invocation)
# clang version 8.0.1 (tags/RELEASE_801/final)
# Target: x86_64-pc-linux-gnu
# Thread model: posix
# InstalledDir: /usr/bin
# clang-8: note: diagnostic msg: PLEASE submit a bug report to and include the crash backtrace, preprocessed source, and associated run script.
# clang-8: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.