[LLVMbugs] [Bug 7920] New: Using const wchar_t and compiling with -g causes segfault.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Aug 16 02:40:22 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7920
Summary: Using const wchar_t and compiling with -g causes
segfault.
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: hans at chromium.org
CC: llvmbugs at cs.uiuc.edu
The following code causes a segfault when compiling it with the -g flag:
void foo() {
const wchar_t c = L'x';
wchar_t d = c;
}
Using Clang built from r111120 gives the following output:
0 clang 0x00000000018f32ef
1 clang 0x00000000018f3a77
2 libpthread.so.0 0x00007f62df1af7d0
3 clang 0x00000000016f27f5
llvm::DIDescriptor::getUInt64Field(unsigned int) const + 53
4 clang 0x00000000013faa4c
llvm::DwarfDebug::constructGlobalVariableDIE(llvm::MDNode const*) + 2716
5 clang 0x000000000140168f
llvm::DwarfDebug::beginModule(llvm::Module*) + 575
6 clang 0x000000000140251d
llvm::DwarfDebug::DwarfDebug(llvm::AsmPrinter*, llvm::Module*) + 2653
7 clang 0x00000000013e2ee7
llvm::AsmPrinter::doInitialization(llvm::Module&) + 775
8 clang 0x000000000182f9d5
llvm::FPPassManager::doInitialization(llvm::Module&) + 85
9 clang 0x0000000001834123
llvm::FunctionPassManagerImpl::doInitialization(llvm::Module&) + 115
10 clang 0x0000000001834601
llvm::FunctionPassManager::doInitialization() + 17
11 clang 0x00000000007caa8e
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 1230
12 clang 0x00000000007c6925
13 clang 0x0000000000927278 clang::ParseAST(clang::Sema&, bool) + 680
14 clang 0x00000000007c7312 clang::CodeGenAction::ExecuteAction() +
66
15 clang 0x00000000006929b1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 353
16 clang 0x00000000006ab3b5
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1253
17 clang 0x00000000006884f4 cc1_main(char const**, char const**, char
const*, void*) + 484
18 clang 0x000000000068fdd1 main + 5393
19 libc.so.6 0x00007f62de4bf1c4 __libc_start_main + 244
20 clang 0x0000000000686db9
Stack dump:
0. Program arguments: /work/llvm/Release+Asserts/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -S -disable-free -main-file-name a.cc
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.18.0.20080103 -g
-resource-dir /work/llvm/Release+Asserts/lib/clang/2.8 -ferror-limit 19
-fmessage-length 80 -fexceptions -fgnu-runtime -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/cc-GAr20i.s -x c++ a.cc
1. <eof> parser at end of file
2. Code generation
clang: error: clang frontend command failed due to signal 11 (use -v to see
invocation)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list