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

           Summary: lli fails cast assertion.
           Product: new-bugs
           Version: unspecified
          Platform: PC
               URL: http://shootout.alioth.debian.org/u32q/benchmark.php?tes
                    t=binarytrees&lang=gcc&id=5
        OS/Version: Linux
            Status: NEW
          Keywords: regression
          Severity: critical
          Priority: P2
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Compiling and trying to run the bitcode of the binarytrees benchmark crashes
lli.

The following bitcode was compiled both with version 2.2 and 2.4 from Debian
unstable and experimental respectively.

$ lli -version
Low Level Virtual Machine (http://llvm.org/):
  llvm version 2.4 (Debian 2.4-1~exp1)
  Optimized build with assertions.

Compiling to a native binary with llvm-gcc works fine.
Using version 2.2 there was no errors (in fact lli was faster than gcc)
Step 1, compile
$ llvm-gcc binarytrees.c -emit-llvm -c -o binarytrees.bc

Step 2, run with a large input (for me, the limit is at 18, 17 and below works
and 18 and above crashes)
$ lli binarytrees.bc 18
stretch tree of depth 19         check: -1
lli: /build/buildd/llvm-2.4/include/llvm/Support/Casting.h:199: typename
llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
llvm::Instruction, Y = llvm::User*]: Assertion `isa<X>(Val) && "cast<Ty>()
argument of incompatible type!"' failed.
lli[0x85972aa]
/lib/libc.so.6(abort+0x188)[0xb7d6dd78]
/lib/libc.so.6(__assert_fail+0xf0)[0xb7d65590]
lli[0x84b0a2b]
[0x9e69bc0]
[0xa]
Aborted

Running the file with the latest lli (from svn)
$ /usr/local/bin/lli binarytrees.bc 18
stretch tree of depth 19         check: -1
lli: /build/llvm/include/llvm/Support/Casting.h:199: typename
llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
llvm::Instruction, Y = llvm::User*]: Assertion `isa<X>(Val) && "cast<Ty>()
argument of incompatible type!"' failed.
0   lli       0x08973066
1   lli       0x089733a8
2             0xb7f68400 __kernel_sigreturn + 0
3   libc.so.6 0xb7d05d78 abort + 392
4   libc.so.6 0xb7cfd590 __assert_fail + 240
5   lli       0x086510a7
6   lli       0x088163f5
7   lli       0x08816cf1
8   lli       0x08817de1
9   lli       0x089101ad llvm::FPPassManager::runOnFunction(llvm::Function&) +
249
10  lli       0x08910c22 llvm::FunctionPassManagerImpl::run(llvm::Function&) +
116
11  lli       0x08910d83 llvm::FunctionPassManager::run(llvm::Function&) + 137
12  lli       0x085b3f23 llvm::JIT::runJITOnFunction(llvm::Function*) + 119
13  lli       0x085b4315 llvm::JIT::getPointerToFunction(llvm::Function*) + 649
14  lli       0x085bd431
15  lli       0x0855b8f1 X86CompilationCallback2 + 142
16  lli       0x0855b529
17  lli       0xb6d57ffd
18  libc.so.6 0xb7da4bee clone + 94
Aborted


-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to