[LLVMbugs] [Bug 4512] New: ARM/Linux ExecutionEngine segfault in Intercept. cpp StatSymbols::StatSymbols() constructor
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Jul 7 03:27:41 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4512
Summary: ARM/Linux ExecutionEngine segfault in Intercept.cpp
StatSymbols::StatSymbols() constructor
Product: new-bugs
Version: unspecified
Platform: Other
OS/Version: Linux
Status: NEW
Keywords: crash-on-invalid, portability
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: xerxes at zafena.se
CC: llvmbugs at cs.uiuc.edu
This bug currently breaks all tools using the ExecutionEngine on ARM/Linux
lli, examples like Fibonacci, BrainF... , projects like OpenJDK+shark JIT etc..
xerxes at debian:/usr/src/build/nightly/llvm-74823/Release/bin$ ./lli
Segmentation fault
xerxes at debian:/usr/src/build/nightly/llvm-74823/Release/bin$ gdb ./lli
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabi"...
(gdb) run
Starting program: /usr/src/build/nightly/llvm-74823/Release/bin/lli
[Thread debugging using libthread_db enabled]
[New Thread 0x4001f620 (LWP 10219)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x4001f620 (LWP 10219)]
0x400bdaec in std::_Rb_tree_decrement () from /usr/lib/libstdc++.so.6
(gdb) bt
#0 0x400bdaec in std::_Rb_tree_decrement () from /usr/lib/libstdc++.so.6
#1 0x005741ac in std::_Rb_tree<std::string, std::pair<std::string const,
void*>, std::_Select1st<std::pair<std::string const, void*> >,
std::less<std::string>, std::allocator<std::pair<std::string const, void*> >
>::_M_insert_unique ()
#2 0x00574334 in std::_Rb_tree<std::string, std::pair<std::string const,
void*>, std::_Select1st<std::pair<std::string const, void*> >,
std::less<std::string>, std::allocator<std::pair<std::string const, void*> >
>::_M_insert_unique_ ()
#3 0x00573a80 in llvm::sys::DynamicLibrary::AddSymbol ()
#4 0x002f6a20 in global constructors keyed to Intercept.cpp ()
#5 0x0057e4dc in __libc_csu_init ()
#6 0x40214fb8 in __libc_start_main () from /lib/libc.so.6
#7 0x000c4334 in _start ()
(gdb)
The problematic lines for ARM/Linux in Intercept.cpp are:
sys::DynamicLibrary::AddSymbol("stat", (void*)(intptr_t)stat);
sys::DynamicLibrary::AddSymbol("fstat", (void*)(intptr_t)fstat);
sys::DynamicLibrary::AddSymbol("lstat", (void*)(intptr_t)lstat);
sys::DynamicLibrary::AddSymbol("stat64", (void*)(intptr_t)stat64);
sys::DynamicLibrary::AddSymbol("\x1stat64", (void*)(intptr_t)stat64);
sys::DynamicLibrary::AddSymbol("\x1open64", (void*)(intptr_t)open64);
sys::DynamicLibrary::AddSymbol("\x1lseek64", (void*)(intptr_t)lseek64);
sys::DynamicLibrary::AddSymbol("fstat64", (void*)(intptr_t)fstat64);
sys::DynamicLibrary::AddSymbol("lstat64", (void*)(intptr_t)lstat64);
sys::DynamicLibrary::AddSymbol("atexit", (void*)(intptr_t)atexit);
sys::DynamicLibrary::AddSymbol("mknod", (void*)(intptr_t)mknod);
Do ARM/Linux need these lines or are they only needed for X86_64/Linux ?
Are we missing some include like:
#if defined(Linux)
#include <features.h> // __USE_EXTERN_INLINES?
#ifndef __USE_EXTERN_INLINES
#define __USE_EXTERN_INLINES
#endif
#endif
so that stat can be resolved in sys/stat.h?
Someone have better ideas?
--
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.
More information about the llvm-bugs
mailing list