<html>
<head>
<base href="https://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 --- - Segmentation fault in clang::TypoCorrectionConsumer::getNextCorrection()"
href="https://llvm.org/bugs/show_bug.cgi?id=28007">28007</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Segmentation fault in clang::TypoCorrectionConsumer::getNextCorrection()
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</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>blochberger.max+llvm@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=16475" name="attach_16475" title="Backtrace">attachment 16475</a> <a href="attachment.cgi?id=16475&action=edit" title="Backtrace">[details]</a></span>
Backtrace
I used fuzzy C-code generated by an RNN from [1] and ran clang to check the
syntax of the generated file.
I tried it with clang from git, current master branch:
$ clang --version
clang version 3.9.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
8a5b8a50d58ea9a3c55315304e7d12be587467f0) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
3789c0fe24475b95ced3cb8206724dd9532ef2ca)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /usr/local/bin
Here is the command I ran and the error message generated by clang, other
results omitted:
$ clang -fsyntax-only -ferror-limit=0 rnn-linux02.c
[...]
Stack dump:
0. Program arguments: /usr/local/bin/clang-3.9 -cc1 -triple
x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage
-Werror=deprecated-objc-isa-usage -fsyntax-only -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name rnn-linux02.c
-mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim
-masm-verbose -munwind-tables -target-cpu core2 -target-linker-version
264.3.102 -dwarf-column-info -debugger-tuning=lldb -resource-dir
/usr/local/bin/../lib/clang/3.9.0 -fdebug-compilation-dir
/private/var/folders/24/3jtybqq573n5mzdk2c1p4mmm0000gn/T -ferror-limit 0
-fmessage-length 204 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.11.0
-fencode-extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option
-fcolor-diagnostics -x c rnn-linux02.c
1. rnn-linux02.c:40:19: current parser token ')'
2. rnn-linux02.c:30:1: parsing function body 'do_command'
3. rnn-linux02.c:30:1: in compound statement ('{}')
4. rnn-linux02.c:36:28: in compound statement ('{}')
clang-3.9: error: unable to execute command: Segmentation fault: 11
clang-3.9: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.9.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
8a5b8a50d58ea9a3c55315304e7d12be587467f0) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
3789c0fe24475b95ced3cb8206724dd9532ef2ca)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /usr/local/bin
clang-3.9: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> 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:
/var/folders/24/3jtybqq573n5mzdk2c1p4mmm0000gn/T/rnn-linux02-8f0dfd.c
clang-3.9: note: diagnostic msg:
/var/folders/24/3jtybqq573n5mzdk2c1p4mmm0000gn/T/rnn-linux02-8f0dfd.sh
clang-3.9: note: diagnostic msg:
********************
[1] <a href="https://karpathy.github.io/2015/05/21/rnn-effectiveness/">https://karpathy.github.io/2015/05/21/rnn-effectiveness/</a></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>