mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
Issue #904: Crash in rocksdb::IOStatsContext::Reset, this=NULL
Fix both code paths: - Change the test source code so it doesn't cause the "Unused variable" warning (which -Werror converted into error and caused CMake not to set HAVE_THREAD_LOCAL) - If the system doesn't seem to support HAVE_THREAD_LOCAL, refuse to compile (rather than producing a binary that crashes for some tests) Originally submitted at https://github.com/facebook/mysql-5.6/pull/905
This commit is contained in:
parent
76a94a03db
commit
5f66c58f6d
1 changed files with 5 additions and 0 deletions
|
|
@ -124,10 +124,15 @@ CHECK_CXX_SOURCE_COMPILES("
|
|||
#endif
|
||||
int main() {
|
||||
static __thread int tls;
|
||||
tls=0;
|
||||
return tls;
|
||||
}
|
||||
" HAVE_THREAD_LOCAL)
|
||||
if(HAVE_THREAD_LOCAL)
|
||||
ADD_DEFINITIONS(-DROCKSDB_SUPPORT_THREAD_LOCAL)
|
||||
else()
|
||||
MESSAGE(SEND_ERROR "The compiler failed the check for ROCKSDB_SUPPORT_THREAD_LOCAL. "
|
||||
"MyRocks requires that feature.")
|
||||
endif()
|
||||
|
||||
INCLUDE(build_rocksdb.cmake)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue