[LLVMdev] Crash using the JIT on x86 but work on x64
Skykill Skyoverside
skyoverside at live.fr
Sat Jul 7 04:49:00 PDT 2012
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
More information about the llvm-dev
mailing list