<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Core dump while parsing code with templates"
href="http://llvm.org/bugs/show_bug.cgi?id=17542">17542</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Core dump while parsing code with templates
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Sun
</td>
</tr>
<tr>
<th>OS</th>
<td>Solaris
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>phantall@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Environment details:
sparc-sun-solaris2.10
gcc 4.7.2
ocaml 4.0 (though I assume that's only for generating documentation?)
llvm-3.2
clang-3.2
compiler-rt-3.2
I had to make a number of edits to build scripts to ensure it used GNU tools
(like tail, head, grep, etc) ... otherwise, I've made no further changes.
I was able to build/install, though I don't think a single test is passing
right now.
I'm able to build C object files, but I have to link them with something else
because Tools.cpp needs support added for sparc/solaris.
However, C++ is another matter:
~ printf 'template < typename T >\nstruct Test;\n' \
| clang++ -xc++ -c -o blah.o -
clang: warning: unknown platform, assuming -mfloat-abi=soft
Stack dump:
0. Program arguments: ${CLANG_BIN}/clang -cc1 -triple
sparc-sun-solaris2.10 -emit-obj -mrelax-all -disable-free -main-file-name -
-mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -msoft-float -target-feature +soft-float
-target-linker-version -momit-leaf-frame-pointer -coverage-file ${PWD}/blah.o
-resource-dir ${CLANG_BIN}/../lib/clang/3.2 -fmodule-cache-path
/var/tmp/clang-module-cache -fdeprecated-macro -fdebug-compilation-dir ${PWD}
-ferror-limit 19 -fmessage-length 225 -mstackrealign -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
blah.o -x c++ -
1. <stdin>:2:12: current parser token ';'
clang: error: unable to execute command: Bus Error (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (tags/RELEASE_32/final)
Target: sparc-sun-solaris2.10
Thread model: posix
Unfortunately, this machine is not connected to the internet and I'm not able
to copy anything off of it so I'm not able to provide a core dump. I also
wasn't expecting sparc/solaris to be this raw, so I didn't think to make a
debug build, so I'll have to rebuild it overnight to get you anything further.
The core dump didn't give me a lot, but it's something:
~ gdb_solaris /path/to/clang core
GNU gdb (GDB) 7.2
(...)
Reading symbols (...)
Core was generated by `/path/to/clang -cc1 -triple sparc-sun-sola'
Program terminated with signal 10, Bus error.
#0 0x01066814 in
clang::TemplateSpecializationType::TemplateSpecializationType(clang::TemplateName,
clang::TemplateArgument const*, unsigned int, clang::QualType, clang::QualType)
()
(gdb) back
#0 0x01066814 in
clang::TemplateSpecializationType::TemplateSpecializationType(clang::TemplateName,
clang::TemplateArgument const*, unsigned int, clang::QualType, clang::QualType)
()
#1 0x00ec55bc in
clang::ASTContext::getCanonicalTemplateSpecializationType(clang::TemplateName,
clang::TemplateArgument const*, unsigned int) const ()
#2
...
#20 0x022787fc in main ()
Unfortunately, without a debug build I can't give line #s, so I'm not going to
bother typing up the rest of the stack trace.
I'll try to get more info later.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>