[LLVMbugs] [Bug 18626] New: Segfault in 'Live Variable Analysis' with fsanitize=address

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 27 00:45:35 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18626

            Bug ID: 18626
           Summary: Segfault in 'Live Variable Analysis' with
                    fsanitize=address
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: octoploid at yandex.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

% 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
http://llvm.org/bugs/ 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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140127/fc65c24f/attachment.html>


More information about the llvm-bugs mailing list