[TSan] Fix TSan initializaion. 89/152589/3
authorDenis Khalikov <d.khalikov@partner.samsung.com>
Tue, 26 Sep 2017 09:34:21 +0000 (12:34 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Thu, 7 Dec 2017 04:53:43 +0000 (04:53 +0000)
TSan uses procfs for every ThreadContext.
We should ensure that procfs is mounted, to
avoid an error when TSan is initializing.

Change-Id: I8e9a3ec6f8920c95b5246bda56f5c55ef9fffb0e

libsanitizer/tsan/tsan_rtl.cc

index 0a40e3c..dd679f3 100644 (file)
@@ -336,6 +336,7 @@ void Initialize(ThreadState *thr) {
 
   ctx = new(ctx_placeholder) Context;
   const char *options = GetEnv(SANITIZER_GO ? "GORACE" : "TSAN_OPTIONS");
+  MaybeMountProcFS();
   CacheBinaryName();
   InitializeFlags(&ctx->flags, options);
   AvoidCVE_2016_2143();