[Lldb-commits] [lldb] r274388 - Thread local storage was already broken on Linux and the tests were passing because there was a dectorator:
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 1 14:25:20 PDT 2016
Author: gclayton
Date: Fri Jul 1 16:25:20 2016
New Revision: 274388
URL: http://llvm.org/viewvc/llvm-project?rev=274388&view=rev
Log:
Thread local storage was already broken on Linux and the tests were passing because there was a dectorator:
@unittest2.expectedFailure("rdar://7796742")
Which was covering up the fact this was failing on linux and hexagon. I added back a decorator so we don't break any build bots.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py
lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py?rev=274388&r1=274387&r2=274388&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py Fri Jul 1 16:25:20 2016
@@ -27,6 +27,7 @@ class TlsGlobalTestCase(TestBase):
self.addTearDownHook(lambda: self.runCmd("settings remove target.env-vars " + self.dylibPath))
@skipIfWindows # TLS works differently on Windows, this would need to be implemented separately.
+ @unittest2.expectedFailure("now works on Darwin, but not linux")
def test(self):
"""Test thread-local storage."""
self.build()
Modified: lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp?rev=274388&r1=274387&r2=274388&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp Fri Jul 1 16:25:20 2016
@@ -688,5 +688,8 @@ DynamicLoaderHexagonDYLD::GetThreadLocal
"module=%s, link_map=0x%" PRIx64 ", tp=0x%" PRIx64 ", modid=%i, tls_block=0x%" PRIx64,
mod->GetObjectName().AsCString(""), link_map, tp, modid, tls_block);
- return tls_block + tls_file_addr;
+ if (tls_block == LLDB_INVALID_ADDRESS)
+ return LLDB_INVALID_ADDRESS;
+ else
+ return tls_block + tls_file_addr;
}
Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=274388&r1=274387&r2=274388&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Fri Jul 1 16:25:20 2016
@@ -641,7 +641,10 @@ DynamicLoaderPOSIXDYLD::GetThreadLocalDa
"module=%s, link_map=0x%" PRIx64 ", tp=0x%" PRIx64 ", modid=%" PRId64 ", tls_block=0x%" PRIx64 "\n",
module_sp->GetObjectName().AsCString(""), link_map, tp, (int64_t)modid, tls_block);
- return tls_block + tls_file_addr;
+ if (tls_block == LLDB_INVALID_ADDRESS)
+ return LLDB_INVALID_ADDRESS;
+ else
+ return tls_block + tls_file_addr;
}
void
More information about the lldb-commits
mailing list