clang crashes on "make -j4 buildkernel" at 12-CURRENT
Lev Serebryakov
lev at FreeBSD.org
Thu Nov 9 16:01:20 UTC 2017
I'm trying to build new NanoBSD "firmware" and have semi-reproducable
clang crash.
System is 12-CURRENT amd64 r325554, sources is 12-CURRENt r325594
It is guest running on VirtualBox 5.2. Memory & CPU of host is Ok for sure.
On "build kernel" stage with "make -j4" I get clang crash (output and
backtrace are at the end of this message).
It is always at same place, so it doesn't look like random memory
error, but what is strange — "make -j1" works.
Previous versions of FreeBSD didn't have this problem.
Maybe, it is same problem as with lld and latest ZFS changes?
cc -target x86_64-unknown-freebsd12.0
--sysroot=/usr/obj/nanobsd/data/src/amd64.amd64/tmp
-B/usr/obj/nanobsd/data/src/amd64.amd64/tmp/usr/bin -O2 -pipe
-fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc
-I/data/src/sys/netgraph/bluetooth/include
-I/data/src/sys/netgraph/bluetooth/drivers/ubt
-DHAVE_KERNEL_OPTION_HEADERS -include
/usr/obj/nanobsd/data/src/amd64.amd64/sys/D2500CC/opt_global.h -I.
-I/data/src/sys -fno-common -g -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer
-I/usr/obj/nanobsd/data/src/amd64.amd64/sys/D2500CC -MD
-MF.depend.ng_ubt.o -MTng_ubt.o -mcmodel=kernel -mno-red-zone -mno-mmx
-mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding
-fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign
-D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs
-fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error-tautological-compare -Wno-error-empty-body
-Wno-error-parentheses-equality -Wno-error-unused-function
-Wno-error-pointer-sign -Wno-error-shift-negative-value
-Wno-error-address-of-packed-member -mno-aes -mno-avx
-std=iso9899:1999 -c
/data/src/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c -o ng_ubt.o
Assertion failed: ((!RequiresNullTerminator || BufEnd[0] == 0) &&
"Buffer is not null terminated!"), function init, file
/data/src/contrib/llvm/lib/Support/MemoryBuffer.cpp, line 48.
cc: error: unable to execute command: Abort trap (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see
invocation)
FreeBSD clang version 5.0.0 (tags/RELEASE_500/final 312559) (based on
LLVM 5.0.0svn)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin
cc: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.freebsd.org/submit/ and include the crash backtrace,
preprocessed source, and associated run script.
cc: error: unable to execute command: Abort trap (core dumped)
cc: note: diagnostic msg: Error generating preprocessed source(s).
*** [ng_ubt.o] Error code 254
Backtrace is
* frame #0: 0x0000000002dfa86a cc`thr_kill at thr_kill.S:3
frame #1: 0x0000000002dfa83f cc`__raise(s=6) at raise.c:52
frame #2: 0x0000000002dfa806 cc`abort at abort.c:77
frame #3: 0x0000000002e2398a cc`__assert(func=<unavailable>,
file=<unavailable>, line=<unavailable>, failedexpr=<unavailable>) at
assert.c:51
frame #4: 0x0000000002c1dbc0 cc`::getOpenFileImpl() [inlined] init
at MemoryBuffer.cpp:47
frame #5: 0x0000000002c1dba7 cc`::getOpenFileImpl() [inlined]
MemoryBufferMMapFile at MemoryBuffer.cpp:216
frame #6: 0x0000000002c1dba7 cc`::getOpenFileImpl() at
MemoryBuffer.cpp:369
frame #7: 0x0000000002c1d806 cc`llvm::MemoryBuffer::getOpenFile(int,
llvm::Twine const&, unsigned long, bool, bool) at MemoryBuffer.cpp:415
frame #8: 0x0000000000e5c8c1 cc`(anonymous
namespace)::RealFile::getBuffer(llvm::Twine const&, long, bool, bool) at
VirtualFileSystem.cpp:177
frame #9: 0x0000000000e3e872
cc`clang::FileManager::getBufferForFile(clang::FileEntry const*, bool,
bool) + 146
frame #10: 0x0000000000a08452 cc`::getBuffer() at SourceManager.cpp:98
frame #11: 0x00000000005db4a7 cc`::getBuffer() at SourceManager.h:929
frame #12: 0x0000000000768068
cc`clang::Preprocessor::EnterSourceFile(clang::FileID,
clang::DirectoryLookup const*, clang::SourceLocation) + 184
frame #13: 0x0000000000774da7 cc`::HandleIncludeDirective() at
PPDirectives.cpp:2019
frame #14: 0x00000000007709f7 cc`::HandleDirective() at
PPDirectives.cpp:966
frame #15: 0x0000000000e4a376
cc`clang::Lexer::LexTokenInternal(clang::Token&, bool) + 4422
frame #16: 0x0000000000e480d5 cc`clang::Lexer::Lex(clang::Token&) + 117
frame #17: 0x000000000073f1c2 cc`::Lex() at Preprocessor.cpp:751
frame #18: 0x00000000004833fd cc`::RewriteIncludesInInput() at
InclusionRewriter.cpp:619
frame #19: 0x000000000040eaa2 cc`::ExecuteAction() at
FrontendActions.cpp:313
frame #20: 0x00000000007d5bcc cc`::Execute() at FrontendAction.cpp:902
frame #21: 0x0000000000d0faf1
cc`clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1217
frame #22: 0x000000000040b91e cc`::ExecuteCompilerInvocation() at
ExecuteCompilerInvocation.cpp:251
frame #23: 0x0000000000400943 cc`::cc1_main() at cc1_main.cpp:221
frame #24: 0x0000000000408f48 cc`main [inlined] ExecuteCC1Tool at
driver.cpp:306
frame #25: 0x0000000000408f22 cc`main at driver.cpp:387
frame #26: 0x000000000040035f cc`_start(ap=<unavailable>,
cleanup=<unavailable>) at crt1.c:72
--
// Lev Serebryakov
More information about the freebsd-current
mailing list