[LLVMdev] Trying to run qt app compiled to bit code Assertion failed: (Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!")

Shailesh Kumar shaileshkumar41 at yahoo.com
Tue Aug 20 17:13:20 PDT 2013


Thanks Daniel.
Sure. Attaching the qt app. 

My environment.
1. os x, 
2. qt 5 installed.
3. modify lli to load qt5core,qt5widgets,qt5gui library. I couldnt figure out a way to load these libs as an option to lli.
4. run qmake in the project directory, where you unzip the attachment. Make sure you have Qt 5 binaries in the path. 
5. make
6. llvm-link all .bc files. 


Thanks and Regards,
Shailesh.


________________________________
 From: "Malea, Daniel" <daniel.malea at intel.com>
To: Shailesh Kumar <shaileshkumar41 at yahoo.com>; "llvmdev at cs.uiuc.edu" <llvmdev at cs.uiuc.edu> 
Sent: Tuesday, August 20, 2013 10:46 PM
Subject: Re: [LLVMdev] Trying to run qt app compiled to bit code Assertion failed: (Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!")
 

Looks like a bug in the DebugIR pass. I imagine that without the -debug–ir flag, you will be able to get a little further.

Nonetheless, can you send me the "bitcodetestqtapp" that you're running, or steps to reproduce? I'd love to take a look.

Thanks,
Dan

From: Shailesh Kumar <shaileshkumar41 at yahoo.com<mailto:shaileshkumar41 at yahoo.com>>
Reply-To: Shailesh Kumar <shaileshkumar41 at yahoo.com<mailto:shaileshkumar41 at yahoo.com>>
Date: Tuesday, 20 August, 2013 9:32 AM
To: LLVM List <llvmdev at cs.uiuc.edu<mailto:llvmdev at cs.uiuc.edu>>
Subject: [LLVMdev] Trying to run qt app compiled to bit code Assertion failed: (Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!")

Hi,

I am trying to run a simple qt 5 application compiled to bitcode on OS X. I am getting the following error. I have modified lli to load qt libraries. When I use with option mcjit, I get the following error

lli -use-mcjit -debug-ir bitcodetestqtapp

Assertion failed: (Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!"), function getTypeSizeInBits, file /Users/shailesh/repos/llvm/include/llvm/IR/DataLayout.h, line 449.
0  lli               0x0000000102244f3e llvm::sys::PrintStackTrace(__sFILE*) + 46
1  lli               0x000000010224524b PrintStackTraceSignalHandler(void*) + 27
2  lli               0x0000000102245559 SignalHandler(int) + 297
3  libsystem_c.dylib 0x00007fff85a6d94a _sigtramp + 26
4  libsystem_c.dylib 0x00007fff5e69c488 _sigtramp + 3636652888
5  lli               0x000000010224527b raise + 27
6  lli               0x0000000102245332 abort + 18
7  lli               0x0000000102245311 __assert_rtn + 129
8  lli               0x0000000101a8d8c3 llvm::DataLayout::getTypeSizeInBits(llvm::Type*) const + 115
9  lli               0x0000000101a6e176 (anonymous namespace)::DIUpdater::getOrCreateType(llvm::Type*) + 294
10 lli               0x0000000101a6e435 (anonymous namespace)::DIUpdater::getOrCreateType(llvm::Type*) + 997
11 lli               0x0000000101a6e31b (anonymous namespace)::DIUpdater::getOrCreateType(llvm::Type*) + 715
12 lli               0x0000000101a6e435 (anonymous namespace)::DIUpdater::getOrCreateType(llvm::Type*) + 997
13 lli               0x0000000101a6e31b (anonymous namespace)::DIUpdater::getOrCreateType(llvm::Type*) + 715
14 lli               0x0000000101a6e31b (anonymous namespace)::DIUpdater::getOrCreateType(llvm::Type*) + 715
15 lli               0x0000000101a6e31b (anonymous namespace)::DIUpdater::getOrCreateType(llvm::Type*) + 715
16 lli               0x0000000101a6e31b (anonymous namespace)::DIUpdater::getOrCreateType(llvm::Type*) + 715
17 lli               0x0000000101a6e31b (anonymous namespace)::DIUpdater::getOrCreateType(llvm::Type*) + 715
18 lli               0x0000000101a6e435 (anonymous namespace)::DIUpdater::getOrCreateType(llvm::Type*) + 997
19 lli               0x0000000101a6de39 (anonymous namespace)::DIUpdater::createFunctionSignature(llvm::Function const*) + 249
20 lli               0x0000000101a6adca (anonymous namespace)::DIUpdater::visitFunction(llvm::Function&) + 122
21 lli               0x0000000101a6ad17 llvm::InstVisitor<(anonymous namespace)::DIUpdater, void>::visit(llvm::Function&) + 39
22 lli               0x0000000101a6ace5 void llvm::InstVisitor<(anonymous namespace)::DIUpdater, void>::visit<llvm::ilist_iterator<llvm::Function> >(llvm::ilist_iterator<llvm::Function>, llvm::ilist_iterator<llvm::Function>) + 101
23 lli               0x0000000101a6abc2 llvm::InstVisitor<(anonymous namespace)::DIUpdater, void>::visit(llvm::Module&) + 82
24 lli               0x0000000101a6ab5d llvm::InstVisitor<(anonymous namespace)::DIUpdater, void>::visit(llvm::Module*) + 29
25 lli               0x0000000101a6ab0a (anonymous namespace)::DIUpdater::DIUpdater(llvm::Module&, llvm::StringRef, llvm::StringRef, llvm::Module const*, llvm::ValueMap<llvm::Value const*, llvm::WeakVH, llvm::ValueMapConfig<llvm::Value const*> > const*) + 378
26 lli               0x0000000101a6a1ff (anonymous namespace)::DIUpdater::DIUpdater(llvm::Module&, llvm::StringRef, llvm::StringRef, llvm::Module const*, llvm::ValueMap<llvm::Value const*, llvm::WeakVH, llvm::ValueMapConfig<llvm::Value const*> > const*) + 111
27 lli               0x0000000101a6a0e1 llvm::DebugIR::createDebugInfo(llvm::Module&, llvm::OwningPtr<llvm::Module>&) + 497
28 lli               0x0000000101a6a39c llvm::DebugIR::runOnModule(llvm::Module&) + 268
29 lli               0x0000000101563276 main + 790
30 libdyld.dylib     0x00007fff8975c7e1 start + 0
31 libdyld.dylib     0x0000000000000004 start + 1988769827
Stack dump:
0.Program arguments: lli -use-mcjit -debug-ir bitcodetestqtapp
Illegal instruction: 4


If I dont use mcjit, the window shows up and crashes with the following error. I guess qt uses inline asm somewhere.

lli  bitcodetestqtapp
loading dynamic library error
on timeout 30
LLVM ERROR: JIT does not support inline asm!


Appreciate any help/pointers regarding this.

Thanks,
Shailesh.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130820/010d105c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitcodetestqtapp.zip
Type: application/zip
Size: 52237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130820/010d105c/attachment.zip>


More information about the llvm-dev mailing list