1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/unittests
Lang Hames c3c1858604 [RuntimeDyld] Fix '_' stripping in RTDyldMemoryManager::getSymbolAddressInProcess.
The RTDyldMemoryManager::getSymbolAddressInProcess method accepts a
linker-mangled symbol name, but it calls through to dlsym to do the lookup (via
DynamicLibrary::SearchForAddressOfSymbol), and dlsym expects an unmangled
symbol name.

Historically we've attempted to "demangle" by removing leading '_'s on all
platforms, and fallen back to an extra search if that failed. That's broken, as
it can cause symbols to resolve incorrectly on platforms that don't do mangling
if you query '_foo' and the process also happens to contain a 'foo'.

Fix this by demangling conditionally based on the host platform. That's safe
here because this function is specifically for symbols in the host process, so
the usual cross-process JIT looking concerns don't apply.

M    unittests/ExecutionEngine/ExecutionEngineTest.cpp
M    lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp

llvm-svn: 262657
2016-03-03 21:23:15 +00:00
..
ADT [ADT] Fix PointerEmbeddedInt when the underlying type is uintptr_t. 2016-02-18 21:00:08 +00:00
Analysis [AA] Hoist the logic to reformulate various AA queries in terms of other 2016-03-02 15:56:53 +00:00
AsmParser Remove autoconf support 2016-01-26 21:29:08 +00:00
Bitcode Remove autoconf support 2016-01-26 21:29:08 +00:00
CodeGen Remove autoconf support 2016-01-26 21:29:08 +00:00
DebugInfo [DebugInfoPDB] Add source / line number accessors for PDB. 2016-02-18 18:47:29 +00:00
ExecutionEngine [RuntimeDyld] Fix '_' stripping in RTDyldMemoryManager::getSymbolAddressInProcess. 2016-03-03 21:23:15 +00:00
IR [ConstantRange] Rename test; NFC 2016-03-03 18:31:33 +00:00
LineEditor Remove autoconf support 2016-01-26 21:29:08 +00:00
Linker Delete the deprecated LLVMLinkModules. 2016-02-12 15:28:45 +00:00
MC Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
MI Make a stub version of MITests, instead of reverting. 2016-02-18 07:37:17 +00:00
ObjectYAML Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
Option Remove autoconf support 2016-01-26 21:29:08 +00:00
ProfileData Use LineLocation instead of CallsiteLocation to index callsite profile. 2016-03-03 18:09:32 +00:00
Support Refactor duplicated code for linking with pthread. 2016-03-01 15:54:40 +00:00
Transforms Really fix ASAN leak/etc issues with MemorySSA unittests 2016-03-02 21:16:28 +00:00
CMakeLists.txt Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00