<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 --- - Segfault in 'Live Variable Analysis' with fsanitize=address"
href="http://llvm.org/bugs/show_bug.cgi?id=18626">18626</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Segfault in 'Live Variable Analysis' with fsanitize=address
</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>Linux
</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>octoploid@yandex.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>% cat test.ii
void *a;
void fn1(void *);
void fn2();
void *fn3() {
fn1((void *)68719476736);
if (a)
return 0;
fn2();
if (a == (void *)68719476736)
return a;
int b[1];
fn1(b);
}
% clang++ -fsanitize=address -c -O2 test.ii
test.ii:13:1: warning: control may reach end of non-void function
[-Wreturn-type]
}
^
0 libLLVMSupport.so 0x00007f4e6b2d6e02
llvm::sys::PrintStackTrace(_IO_FILE*) + 34
1 libLLVMSupport.so 0x00007f4e6b2d667c
2 libc.so.6 0x00007f4e6aa52210
3 libLLVMCodeGen.so 0x00007f4e6a1786cf
llvm::LiveVariables::HandleVirtRegUse(unsigned int, llvm::MachineBasicBlock*,
llvm::MachineInstr*) + 79
4 libLLVMCodeGen.so 0x00007f4e6a179628
llvm::LiveVariables::runOnMachineFunction(llvm::MachineFunction&) + 3400
5 libLLVMCore.so 0x00007f4e6b50570e
llvm::FPPassManager::runOnFunction(llvm::Function&) + 622
6 libLLVMCore.so 0x00007f4e6b50578b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
7 libLLVMCore.so 0x00007f4e6b507edd
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 733
8 libclangCodeGen.so 0x00007f4e68f62a12
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) +
2898
9 libclangCodeGen.so 0x00007f4e69078574
10 libclangParse.so 0x00007f4e697a3c8d clang::ParseAST(clang::Sema&,
bool, bool) + 781
11 libclangFrontend.so 0x00007f4e6af7306a clang::FrontendAction::Execute()
+ 170
12 libclangFrontend.so 0x00007f4e6af4c8b0
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 304
13 libclangFrontendTool.so 0x00007f4e6aee89ab
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1515
14 clang-3.5 0x000000000040b260 cc1_main(char const**, char
const**, char const*, void*) + 928
15 clang-3.5 0x0000000000408675 main + 4533
16 libc.so.6 0x00007f4e6aa3df90 __libc_start_main + 240
17 clang-3.5 0x0000000000408d2e
Stack dump:
0. Program arguments: /usr/local/bin/clang-3.5 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-main-file-name test.ii -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -coverage-file /var/tmp/gcc_build_dir_/gcc/test.o
-resource-dir /usr/local/bin/../lib/clang/3.5 -O2 -fdeprecated-macro
-fdebug-compilation-dir /var/tmp/gcc_build_dir_/gcc -ferror-limit 19
-fmessage-length 174 -fsanitize=address,init-order,use-after-return
-fsanitize-blacklist=/usr/local/bin/../lib/clang/3.5/asan_blacklist.txt
-mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o test.o -x c++-cpp-output test.ii
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'test.ii'.
4. Running pass 'Live Variable Analysis' on function '@_Z3fn3v'
clang-3.5: error: unable to execute command: Segmentation fault
clang-3.5: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.5: 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.5: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.</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>