Permalink
Browse files

Fix unknown memory corruption issues.

When HAVE_TLS is enabled, memory corruption issues happen for
multi-threaded applications. Empty allocated memory spaces pop up
in central free list and thread cache list.
Sounds like gcc under cygwin/mingw doesn't have good support for tls.
  • Loading branch information...
1 parent 6b6b5dd commit 0f78806c2c123976c4ef3cb77321984ff4471842 @bcui6611 committed Feb 10, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 gperftools-2.0/src/windows/mingw.h
@@ -60,6 +60,10 @@
// pretend the pthreads wrapper doesn't exist, even when it does.
#undef HAVE_PTHREAD
+// Under cygwin/mingw, we have experienced unknown memory corruptions
+// Disable it for the time being.
+#undef HAVE_TLS
+
#include "windows/port.h"
#endif /* __MINGW32__ */

0 comments on commit 0f78806

Please sign in to comment.