[TSan] Align thread_registry_placeholder

s390x requires ThreadRegistry.mtx_.opaque_storage_ to be 4-byte
aligned. Since other architectures may have similar requirements, use
the maximum thread_registry_placeholder alignment from other
sanitizers, which is 64 (LSan).

Reviewed By: dvyukov

Differential Revision: https://reviews.llvm.org/D105629
This commit is contained in:
Ilya Leoshkevich 2021-07-13 15:51:47 +02:00
parent 54128b73f8
commit cadbb92416
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ void OnInitialize() {
}
#endif
static char thread_registry_placeholder[sizeof(ThreadRegistry)];
static ALIGNED(64) char thread_registry_placeholder[sizeof(ThreadRegistry)];
static ThreadContextBase *CreateThreadContext(u32 tid) {
// Map thread trace when context is created.