[LLVMbugs] [Bug 14325] New: Crash after aborting module compilation

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 13 00:12:23 PST 2012


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

             Bug #: 14325
           Summary: Crash after aborting module compilation
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dirkjan at ochtman.nl
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


djc at djc-mbp lang $ cat test.ll 
target triple = "x86_64-apple-darwin11.0.0"
declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
define void @test(i8* %a, i8* %b, i32 %len) {
    %i = alloca i1
    store i1 0, i1* %i
    %al = load i1* %i
    call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a, i8* %b, i32 %len, i32 1, i1
%al)
    ret void
}
djc at djc-mbp lang $ clang test.ll 
isvolatile argument of memory intrinsics must be a constant int
  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a, i8* %b, i32 %len, i32 1, i1 %al)
Broken module found, compilation aborted!
0  clang             0x000000010b9f03c1
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
769
1  clang             0x000000010b9f0753
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
1683
2  libsystem_c.dylib 0x00007fff9186d8ea _sigtramp + 26
3  libstdc++.6.dylib 0x00007fff9502c347 operator new(unsigned long) + 34
4  clang             0x000000010b9f05d6
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
1302
5  clang             0x000000010b9bb608 std::basic_string<char,
std::char_traits<char>, std::allocator<char> > std::operator+<char,
std::char_traits<char>, std::allocator<char> >(char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
+ 6032
6  clang             0x000000010b9ba4aa std::basic_string<char,
std::char_traits<char>, std::allocator<char> > std::operator+<char,
std::char_traits<char>, std::allocator<char> >(char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
+ 1586
7  clang             0x000000010b9abaaf std::vector<llvm::StructType*,
std::allocator<llvm::StructType*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::StructType**,
std::vector<llvm::StructType*, std::allocator<llvm::StructType*> > >,
llvm::StructType* const&) + 16861
8  clang             0x000000010b9ab5b6 std::vector<llvm::StructType*,
std::allocator<llvm::StructType*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::StructType**,
std::vector<llvm::StructType*, std::allocator<llvm::StructType*> > >,
llvm::StructType* const&) + 15588
9  clang             0x000000010b9ab503 std::vector<llvm::StructType*,
std::allocator<llvm::StructType*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::StructType**,
std::vector<llvm::StructType*, std::allocator<llvm::StructType*> > >,
llvm::StructType* const&) + 15409
10 clang             0x000000010ada84c8
std::vector<clang::serialization::ModuleFile*,
std::allocator<clang::serialization::ModuleFile*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::serialization::ModuleFile**,
std::vector<clang::serialization::ModuleFile*,
std::allocator<clang::serialization::ModuleFile*> > >,
clang::serialization::ModuleFile* const&) + 5878
11 clang             0x000000010ae578f8 std::vector<clang::CXXRecordDecl
const*, std::allocator<clang::CXXRecordDecl const*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CXXRecordDecl const**,
std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl
const*> > >, clang::CXXRecordDecl const* const&) + 5592
12 clang             0x000000010acd26c4 std::vector<clang::CompilerInstance*,
std::allocator<clang::CompilerInstance*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CompilerInstance**,
std::vector<clang::CompilerInstance*, std::allocator<clang::CompilerInstance*>
> >, clang::CompilerInstance* const&) + 11042
13 clang             0x000000010acc0137 std::basic_string<char,
std::char_traits<char>, std::allocator<char> > std::operator+<char,
std::char_traits<char>, std::allocator<char> >(char, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&) + 3151
14 clang             0x000000010acb9444
15 clang             0x000000010acbd4a4 std::vector<std::string,
std::allocator<std::string>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::string*,
std::vector<std::string, std::allocator<std::string> > >, std::string const&) +
1350
16 libdyld.dylib     0x00007fff920d17e1 start + 0
Stack dump:
0.    Program arguments: /usr/local/Cellar/llvm/3.1/bin/clang -cc1 -triple
x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -main-file-name
test.ll -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -target-linker-version 134.9 -resource-dir
/usr/local/Cellar/llvm/3.1/bin/../lib/clang/3.1 -fdebug-compilation-dir
/Users/djc/src/lang -ferror-limit 19 -fmessage-length 100 -stack-protector 1
-mstackrealign -fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/kx/r0q_5lzx0jj0v8rkt8xq1qd40000gn/T/test-HxkypX.o -x ir test.ll 
1.    Per-function optimization
2.    Running pass 'Module Verifier' on function '@test'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.
djc at djc-mbp lang $ clang -v
clang version 3.1 (branches/release_31)
Target: x86_64-apple-darwin12.2.0
Thread model: posix

No need to add a stacktrace after the error message. (Also, the LangRef fails
to clarify the need for constant arguments.)

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list