[llvm-bugs] [Bug 26148] clang crashes on x86_64-linux-gnu at O1 and above in 32-bit and 64-bit modes (Assertion `Offset <= PieceOffset && "overlapping or duplicate pieces"' failed)

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 28 15:06:28 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26148

Chengnian Sun <chengniansun at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|DUPLICATE                   |---

--- Comment #4 from Chengnian Sun <chengniansun at gmail.com> ---
I encounter this bug again. As the test case is similar to what I have
reported, so I just reopen this bug report. 

$: clang-trunk -v
clang version 3.9.0 (trunk 259077) (llvm/trunk 259085)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.1.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$: 
$: clang-trunk -g -O3 small.c
clang-3.9:
/tmp/llvm-builder/llvm-source-trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1579:
void llvm::DebugLocEntry::finalize(const llvm::AsmPrinter&,
llvm::DebugLocStream::ListBuilder&, const llvm::DIBasicType*): Assertion
`Offset <= PieceOffset && "overlapping or duplicate pieces"' failed.
0  clang-3.9       0x0000000001a73fe5
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  clang-3.9       0x0000000001a71d76 llvm::sys::RunSignalHandlers() + 54
2  clang-3.9       0x0000000001a71fa1
3  libpthread.so.0 0x00007f0db017b340
4  libc.so.6       0x00007f0daf32bcc9 gsignal + 57
5  libc.so.6       0x00007f0daf32f0d8 abort + 328
6  libc.so.6       0x00007f0daf324b86
7  libc.so.6       0x00007f0daf324c32
8  clang-3.9       0x0000000001f0da0c
llvm::DebugLocEntry::finalize(llvm::AsmPrinter const&,
llvm::DebugLocStream::ListBuilder&, llvm::DIBasicType const*) + 1148
9  clang-3.9       0x0000000001f15b96
llvm::DwarfDebug::collectVariableInfo(llvm::DwarfCompileUnit&,
llvm::DISubprogram const*, llvm::DenseSet<std::pair<llvm::DILocalVariable
const*, llvm::DILocation const*>,
llvm::DenseMapInfo<std::pair<llvm::DILocalVariable const*, llvm::DILocation
const*> > >&) + 918
10 clang-3.9       0x0000000001f15fb1
llvm::DwarfDebug::endFunction(llvm::MachineFunction const*) + 241
11 clang-3.9       0x0000000001ef85f8 llvm::AsmPrinter::EmitFunctionBody() +
1720
12 clang-3.9       0x0000000001142526
13 clang-3.9       0x000000000173aa73
llvm::FPPassManager::runOnFunction(llvm::Function&) + 643
14 clang-3.9       0x000000000173ae2b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
15 clang-3.9       0x000000000173b13f
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 751
16 clang-3.9       0x0000000001b929bc
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*)
+ 3660
17 clang-3.9       0x0000000002108b03
18 clang-3.9       0x000000000240b86b clang::ParseAST(clang::Sema&, bool, bool)
+ 571
19 clang-3.9       0x0000000002108bee clang::CodeGenAction::ExecuteAction() +
78
20 clang-3.9       0x0000000001e64f56 clang::FrontendAction::Execute() + 534
21 clang-3.9       0x0000000001e41e1e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 318
22 clang-3.9       0x0000000001ee7b1a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2090
23 clang-3.9       0x00000000009bf798 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2344
24 clang-3.9       0x000000000097ca85 main + 6213
25 libc.so.6       0x00007f0daf316ec5 __libc_start_main + 245
26 clang-3.9       0x00000000009bb7f4
Stack dump:
0.      Program arguments: /usr/local/clang-trunk/bin/clang-3.9 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name small.c
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -dwarf-column-info -debug-info-kind=limited
-dwarf-version=4 -debugger-tuning=gdb -resource-dir
/usr/local/clang-trunk/bin/../lib/clang/3.9.0 -c-isystem . -c-isystem
/usr/local/include/csmith-2.2.0/ -c-isystem /usr/local/include/csmith-2.2.0/
-internal-isystem /usr/local/include -internal-isystem
/usr/local/clang-trunk/bin/../lib/clang/3.9.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O3 -fdebug-compilation-dir
/home/cnsun/ramdisk/speculative-execution/run-7/res/20160128-clang-trunk-m32-g-O3-build-074207/delta
-ferror-limit 19 -fmessage-length 261 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o /home/cnsun/ramdisk/tmp/small-68d5fe.o -x c small.c 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'small.c'.
4.      Running pass 'X86 Assembly / Object Emitter' on function '@fn1'
clang-3.9: error: unable to execute command: Aborted (core dumped)
clang-3.9: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.9.0 (trunk 259077) (llvm/trunk 259085)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-3.9: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.9: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.9: note: diagnostic msg: /home/cnsun/ramdisk/tmp/small-f859c3.c
clang-3.9: note: diagnostic msg: /home/cnsun/ramdisk/tmp/small-f859c3.sh
clang-3.9: note: diagnostic msg: 

********************
$: cat small.c
struct S0 {
  short f0;
  int f3;
} a;
void fn1(short p1) {
  struct S0 b, c = {3};
  b.f3 = p1;
  a = b = c;
}

int main() { return 0; }
$:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160128/2cb55882/attachment.html>


More information about the llvm-bugs mailing list