<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 --- - Clang produces corrupt pch leading to crash in clang::ASTReader::finishPendingActions()"
href="http://llvm.org/bugs/show_bug.cgi?id=20026">20026</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang produces corrupt pch leading to crash in clang::ASTReader::finishPendingActions()
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>tobias.hahn@ableton.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=12654" name="attach_12654" title="A zip archive containing a header, a cpp-file and a script to reproduce the bug.">attachment 12654</a> <a href="attachment.cgi?id=12654&action=edit" title="A zip archive containing a header, a cpp-file and a script to reproduce the bug.">[details]</a></span>
A zip archive containing a header, a cpp-file and a script to reproduce the
bug.
Precompiling the attached code leads to a corrupt pch file that makes clang
crash when using it in a later compilation unit.
Steps to reproduce:
1. Adjust the CC and CFLAGS variables in crashIt.sh to point to the version of
clang under test.
2. Run crashIt.sh.
Expected results:
clang compiles both files without error.
Actual results:
clang crashes when compiling EnvelopeTarget.cpp.
Reproducible:
Running the script produces a crash about 9/10 times, but occasionally,
compilation succeeds.
Notes:
The attached code is a stripped down version of the module of our codebase that
triggers this crash. While stripping out code, intermediate versions
occasionally would trigger malloc assertions in clang like the following:
clang(66542,0x7fff7b37a310) malloc: *** error for object 0x104832208: incorrect
checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
At other times, clang complained that exception specifications on some
destructor had changed when both declaration and definition have no exception
specification:
error: exception specification in declaration does not match previous
declaration
inline AEnvelopeTarget::~AEnvelopeTarget() {}
note: previous declaration is here
virtual ~AEnvelopeTarget() = 0;
^
I tried to strip down the code even further, but the current version appears to
be a minimal example reproducing the issue. Also note that all bogus include
paths on the command line are necessary to reproduce the issue.</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>