tsan: fix build after 287632

1. Mac does not have MAP_32BIT.
Define it to 0 if it is not defined.

2. We are lacking nolibc stub for ListOfModules::init.
Add it.

llvm-svn: 287634
This commit is contained in:
Dmitry Vyukov 2016-11-22 11:09:35 +00:00
parent b920aa0fae
commit 9c5bab23ee
2 changed files with 8 additions and 0 deletions

View File

@ -29,4 +29,8 @@ void Abort() { internal__exit(1); }
void SleepForSeconds(int seconds) { internal_sleep(seconds); }
#endif // !SANITIZER_WINDOWS
#if !SANITIZER_WINDOWS && !SANITIZER_MAC
void ListOfModules::init() {}
#endif
} // namespace __sanitizer

View File

@ -23,6 +23,10 @@
#include <string>
#include "test.h"
#ifndef MAP_32BIT
# define MAP_32BIT 0
#endif
void *thr(void *arg) {
// This thread creates lots of separate mappings in /proc/self/maps before
// the ignored library.