Skykill Skyoverside
2012-Jul-07 11:49 UTC
[LLVMdev] Crash using the JIT on x86 but work on x64
Hi, so yes assertions are enabled by default in Debug from what i could see in the CMakeLists.txt if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" ) option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF) else() option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON) endif() Without assertions enabled, when i'm running the program without the debugger, it simply freeze until i close it, but not crash at all. Here is the call stack for the x86 Debug build without assertions enabled: ntdll.dll!778515de() [Les frames ci-dessous sont peut-être incorrects et/ou manquants, aucun symbole chargé pour ntdll.dll] ntdll.dll!778515de() ntdll.dll!7784014e()> msvcp100d.dll!std::_Lockit::_Lockit(int kind) Ligne 64 + 0x14 octets > C++msvcp100d.dll!std::_Container_base12::_Orphan_all() Ligne 200 C++ LLVM_Test_Console.exe!std::_String_val<char,std::allocator<char> >::~_String_val<char,std::allocator<char> >() Ligne 478 + 0xb octets C++ LLVM_Test_Console.exe!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >() Ligne 754 + 0xf octets C++ LLVM_Test_Console.exe!TestClass1::test2(std::basic_string<char,std::char_traits<char>,std::allocator<char> > s) Ligne 172 + 0xf octets C++ 01180091() LLVM_Test_Console.exe!llvm::JIT::runFunction(llvm::Function * F, const std::vector<llvm::GenericValue,std::allocator<llvm::GenericValue> > & ArgValues) Ligne 455 + 0x7 octets C++ LLVM_Test_Console.exe!main(int argc, char * * argv, char * const * envp) Ligne 254 + 0x43 octets C++ LLVM_Test_Console.exe!__tmainCRTStartup() Ligne 555 + 0x19 octets C LLVM_Test_Console.exe!mainCRTStartup() Ligne 371 C kernel32.dll!76dd339a() ntdll.dll!77869ef2() ntdll.dll!77869ec5() Thank you. -----Message d'origine----- From: Duncan Sands Sent: Saturday, July 07, 2012 9:22 AM To: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Crash using the JIT on x86 but work on x64 Hi Skykill,> Hello everyone, i’m using LLVM (updated to 3.1 after seeing that bug, but > it’s > the same with 3.0) for running a bitcode on a C++ program, and Clang for > compiling it. My code work perfectly, as expected on x64, but crash on > x86. I’m > on Windows 7 x64 and LLVM + Clang was compiled using Visual Studio 2010 > (tested > in both Release and Debug build). Project was make using CMake.did you build LLVM with assertions enabled? -DLLVM_ENABLE_ASSERTIONS=true. (I don't recall if cmake Debug build enables assertions by default). Ciao, Duncan. _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Skykill Skyoverside <skyoverside at live.fr> writes: [snip] My guess is that you are hitting a VS C++ ABI missing feature in Clang. Ask in the Clang mailing list for a confirmation, but IIRC there are still missing pieces on either object construction/destrucion, parameter passing, returning classes and C++ exception support.
Skykill Skyoverside
2012-Jul-08 00:36 UTC
[LLVMdev] Crash using the JIT on x86 but work on x64
Thank, i have posted a mail about that. What i don't understand, is why it only work on x64, it should be more logical that it work only on x86, since most library focus first on working x86 before x64. The function getMethodPointer come from here http://stackoverflow.com/questions/3104389/can-i-bind-an-existing-method-to-a-llvm-function-and-use-it-from-jitted-code they said "that probably will only be compatible with the Itanium ABI", so does it could be because of that? -----Message d'origine----- From: Óscar Fuentes Sent: Saturday, July 07, 2012 4:57 PM To: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Crash using the JIT on x86 but work on x64 Skykill Skyoverside <skyoverside at live.fr> writes: [snip] My guess is that you are hitting a VS C++ ABI missing feature in Clang. Ask in the Clang mailing list for a confirmation, but IIRC there are still missing pieces on either object construction/destrucion, parameter passing, returning classes and C++ exception support. _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Apparently Analagous Threads
- [LLVMdev] Crash using the JIT on x86 but work on x64
- [LLVMdev] Crash using the JIT on x86 but work on x64
- [LLVMdev] Crash using the JIT on x86 but work on x64
- [LLVMdev] Crash using the JIT on x86 but work on x64
- Bug#680102: xcp-xapi: xcp fails eject host from pool (no /etc/firstboot.d found)