I want to use a newer version, but skyey expect to use version 2.8.<br><br><div class="gmail_quote">2012/6/4 Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<div class="im"><br>
> I am very sorry to trouble you, but I need your help about my problem about<br>
> ThreadLocalImpl in llvm of 2.8 version.<br>
<br>
</div>this is a very old version of LLVM, I suggest you try something newer, eg the<br>
recently released version 3.1.<br>
<br>
Best wishes, Duncan.<br>
<div><div class="h5"><br>
I have compiled it in Windows xp with<br>
> mingw, and have compiled skyeye(an open source project about simulator) as it<br>
> uses llvm. But when I run a testcase ---- arm_hello, it came out segment fault.<br>
> I used gdb.exe to trace it, it gave the following infomation:<br>
><br>
> $ gdb.exe /opt/skyeye/bin/skyeye<br>
> GNU gdb 6.8<br>
> Copyright (C) 2008 Free Software Foundation, Inc.<br>
> License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html" target="_blank">http://gnu.org/licenses/gpl.html</a>><br>
> This is free software: you are free to change and redistribute it.<br>
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"<br>
> and "show warranty" for details.<br>
> This GDB was configured as "i686-pc-mingw32"...<br>
> (gdb) set args -n -e arm_hello<br>
> (gdb) run<br>
> Starting program: C:/msys/1.0/opt/skyeye/bin/skyeye.exe -n -e arm_hello<br>
> [New thread 1696.0xec]<br>
><br>
> Program received signal SIGSEGV, Segmentation fault.<br>
> 0x7c809f42 in KERNEL32!IsBadWritePtr () from C:\WINDOWS\system32\kernel32.dll<br>
> (gdb) bt<br>
> #0 0x7c809f42 in KERNEL32!IsBadWritePtr ()<br>
> from C:\WINDOWS\system32\kernel32.dll<br>
> #1 0x00000001 in ?? ()<br>
> #2 0xbaadf00d in ?? ()<br>
> #3 0x0002020b in ?? ()<br>
> #4 0x0022f904 in ?? ()<br>
> #5 0x0022f8b4 in ?? ()<br>
> #6 0x7c9301c0 in ntdll!RtlAppendStringToString ()<br>
> from C:\WINDOWS\system32\ntdll.dll<br>
> #7 0x0022fb08 in ?? ()<br>
> #8 0x7c839ac0 in ValidateLocale () from C:\WINDOWS\system32\kernel32.dll<br>
> #9 0x71065fd0 in msys-1!cfsetispeed () from C:\msys\1.0\bin\msys-1.0.dll<br>
> #10 0x71066000 in msys-1!cfsetispeed () from C:\msys\1.0\bin\msys-1.0.dll<br>
> #11 0x71066c5a in msys-1!cfsetispeed () from C:\msys\1.0\bin\msys-1.0.dll<br>
> #12 0x7104129a in pthread_key_create () from C:\msys\1.0\bin\msys-1.0.dll<br>
> #13 0x66594055 in llvm::sys::ThreadLocalImpl::ThreadLocalImpl ()<br>
> from C:\msys\1.0\opt\skyeye\bin\libcommon-0.dll<br>
> #14 0x77c04ee5 in msvcrt!__doserrno () from C:\WINDOWS\system32\msvcrt.dll<br>
> #15 0x66081133 in atexit () from C:\msys\1.0\opt\skyeye\bin\libcommon-0.dll<br>
> #16 0x660810e1 in DllMainCRTStartup@12 ()<br>
> from C:\msys\1.0\opt\skyeye\bin\libcommon-0.dll<br>
> #17 0x7c92118a in ntdll!LdrSetAppCompatDllRedirectionCallback ()<br>
> from C:\WINDOWS\system32\ntdll.dll<br>
> #18 0x66080000 in ?? ()<br>
> #19 0x00000001 in ?? ()<br>
> #20 0x66081060 in __dll_exit ()<br>
> from C:\msys\1.0\opt\skyeye\bin\libcommon-0.dll<br>
> #21 0x7c93c4da in ntdll!LdrHotPatchRoutine ()<br>
> from C:\WINDOWS\system32\ntdll.dll<br>
> #22 0x7c941194 in ntdll!RtlMapGenericMask ()<br>
> from C:\WINDOWS\system32\ntdll.dll<br>
> #23 0x7c94108f in ntdll!RtlMapGenericMask ()<br>
> from C:\WINDOWS\system32\ntdll.dll<br>
> #24 0x7c92e437 in ntdll!LdrCreateOutOfProcessImage ()<br>
> from C:\WINDOWS\system32\ntdll.dll<br>
> (gdb)<br>
><br>
> At last, I print some information in ThreadLocalImpl function:<br>
> 44 ThreadLocalImpl::ThreadLocalImpl() : data(0) {<br>
> 45 pthread_key_t* key = new pthread_key_t;<br>
> 46 printf("IN %s, line = %d key: 0x%x\n", __FUNCTION__, __LINE__, key);<br>
> 47 int errorcode = pthread_key_create(key, NULL);<br>
> 48 printf("In %s, line = %d\n", __FUNCTION__, __LINE__);<br>
> 49 assert(errorcode == 0);<br>
> 50 (void) errorcode;<br>
> 51 data = (void*)key;<br>
> 52 }<br>
><br>
><br>
> It print the following information:<br>
><br>
> $ /opt/skyeye/bin/skyeye.exe -n -e arm_hello<br>
> IN ThreadLocalImpl, line = 46 key: 0x3e2c68<br>
> --<br>
> ADDRESS:清华大学FIT楼4-308<br>
> TEL: 156-1166-2737<br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>ADDRESS:清华大学FIT楼4-308<div>TEL: 156-1166-2737</div><br>