Bug 206299 - base/projects/clang380-import -r294096 buildworld targeting arm (for rpi2): assertion failed
Summary: base/projects/clang380-import -r294096 buildworld targeting arm (for rpi2): a...
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm Any
: --- Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-15 22:22 UTC by Mark Millard
Modified: 2016-06-13 19:34 UTC (History)
0 users

See Also:


Attachments
.zip of the the .sh and .c that clang generated for the report. (46.70 KB, application/zip)
2016-01-15 22:22 UTC, Mark Millard
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Millard 2016-01-15 22:22:51 UTC
Created attachment 165644 [details]
.zip of the the .sh and .c that clang generated for the report.

My attempted buildworld of -r294096 from amd64 targeting arm for an rpi2 stopped with:

--- all_subdir_usr.sbin ---
Assertion failed: (Offset <= PieceOffset && "overlapping or duplicate pieces"), function finalize, file /usr/src/lib/clang/libllvmasmprinter/../../../contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp, line 1561.
. . .
--- all_subdir_usr.sbin ---
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/parser-392d84.c
clang: note: diagnostic msg: /tmp/parser-392d84.sh
clang: note: diagnostic msg: 

********************
*** [parser.o] Error code 254

make[4]: stopped in /usr/src/usr.sbin/nscd
1 error

Detailed context:

make.conf: empty.

src.conf:

TO_TYPE=armv6
#
KERNCONF=RPI2-NODBG
TARGET=arm
.if ${.MAKE.LEVEL} == 0
TARGET_ARCH=${TO_TYPE}
.export TARGET_ARCH
.endif
#
WITH_FAST_DEPEND=
WITH_LIBCPLUSPLUS=
WITH_BINTOOLS_BOOTSTRAP=
WITH_CLANG=
WITH_CLANG_IS_CC=
WITH_CLANG_FULL=
WITH_LLDB=
WITH_CLANG_EXTRAS=
WITH_BOOT=
#
WITHOUT_LIB32=
WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=
WITHOUT_CLANG_BOOTSTRAP=
WITHOUT_GCC_BOOTSTRAP=
WITHOUT_GCC=
WITHOUT_GNUCXX=
#
NO_WERROR=
MALLOC_PRODUCTION=
#
WITH_DEBUG=
WITH_DEBUG_FILES=
#
.if ${.MAKE.LEVEL} == 0
XCC=/usr/bin/clang -v -target ${TO_TYPE}--freebsd11.0-gnueabi -march=armv7a -mcpu=cortex-a7 -mno-unaligned-access
XCXX=/usr/bin/clang++ -v -target ${TO_TYPE}--freebsd11.0-gnueabi -march=armv7a -mcpu=cortex-a7 -mno-unaligned-access
XCPP=/usr/bin/clang-cpp -v -target ${TO_TYPE}--freebsd11.0-gnueabi -march=armv7a -mcpu=cortex-a7 -mno-unaligned-access
.export XCC
.export XCXX
.export XCPP
.endif
#
.if ${.MAKE.LEVEL} == 0
CC=/usr/bin/clang -v
CXX=/usr/bin/clang++ -v
CPP=/usr/bin/clang-cpp -v
.export CC
.export CXX
.export CPP
.endif


RPI2-NODBG:

ident           RPI2-NODBG

include         "RPI2"

makeoptions     DEBUG=-g                # Build kernel with gdb(1) debug symbols
options         ALT_BREAK_TO_DEBUGGER
#options        VERBOSE_SYSINIT         # Enable verbose sysinit messages

options         KDB                     # Enable kernel debugger support

# For minimum debugger support (stable branch) use:
#options        KDB_TRACE               # Print a stack trace for a panic
options         DDB                     # Enable the kernel debugger

nooptions       INVARIANTS              # Enable calls of extra sanity checking
nooptions       INVARIANT_SUPPORT       # Extra sanity checks of internal structures, required by INVARIANTS
nooptions       WITNESS                 # Enable checks to detect deadlocks and cycles
nooptions       WITNESS_SKIPSPIN        # Don't run witness on spinlocks for speed
nooptions       DIAGNOSTIC
Comment 1 Mark Millard 2016-01-15 23:10:21 UTC
For completness sake (despite the upstream submittal already having been made independently): the back trace that I forgot to include. . .

# /usr/local/bin/gdb clang /var/crash/clang.54393.core 
. . .
Core was generated by `clang'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00000000028a5cba in thr_kill ()
(gdb) bt
#0  0x00000000028a5cba in thr_kill ()
#1  0x00000000028a5c96 in raise ()
#2  0x00000000028a5c56 in abort ()
#3  0x00000000028c50ea in __assert ()
#4  0x0000000001e2e962 in llvm::DebugLocEntry::finalize(llvm::AsmPrinter const&, llvm::DebugLocStream::ListBuilder&, llvm::DIBasicType const*) ()
#5  0x0000000001e2e232 in llvm::DwarfDebug::collectVariableInfo(llvm::DwarfCompileUnit&, llvm::DISubprogram const*, llvm::DenseSet<std::__1::pair<llvm::DILocalVariable const*, llvm::DILocation const*>, llvm::DenseMapInfo<std::__1::pair<llvm::DILocalVariable const*, llvm::DILocation const*> > >&) ()
#6  0x0000000001e2f982 in llvm::DwarfDebug::endFunction(llvm::MachineFunction const*) ()
#7  0x0000000001e0a29b in llvm::AsmPrinter::EmitFunctionBody() ()
#8  0x00000000018a7227 in llvm::ARMAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) ()
#9  0x000000000205eb91 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) ()
#10 0x000000000264cd60 in llvm::FPPassManager::runOnFunction(llvm::Function&) ()
#11 0x000000000264cfab in llvm::FPPassManager::runOnModule(llvm::Module&) ()
#12 0x000000000264d40e in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
#13 0x00000000006c353a in clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*) ()
#14 0x00000000006c0e02 in clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) ()
#15 0x000000000092ef12 in clang::ParseAST(clang::Sema&, bool, bool) ()
#16 0x0000000000440799 in clang::FrontendAction::Execute() ()
#17 0x00000000004653f1 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ()
#18 0x000000000040a5fb in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ()
#19 0x00000000004008ae in cc1_main (Argv=..., Argv0=0x7fffffffdd90 "/usr/bin/clang", MainAddr=0x405bf0 <GetExecutablePath(char const*, bool)>)
    at /usr/src/usr.bin/clang/clang/../../../contrib/llvm/tools/clang/tools/driver/cc1_main.cpp:116
#20 0x0000000000408925 in ExecuteCC1Tool (Tool=..., argv=...) at /usr/src/usr.bin/clang/clang/../../../contrib/llvm/tools/clang/tools/driver/driver.cpp:301
#21 main (argc_=<optimized out>, argv_=<optimized out>) at /usr/src/usr.bin/clang/clang/../../../contrib/llvm/tools/clang/tools/driver/driver.cpp:366
Comment 2 Mark Millard 2016-01-17 06:00:17 UTC
As of -r294194 the assertion is no longer reported in my buildworld activity that targets the rpi2.
Comment 3 Mark Millard 2016-01-17 06:04:15 UTC
(In reply to Mark Millard from comment #2)

-r294179 I meant.