File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
compiler-rt/lib/sanitizer_common Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -244,11 +244,11 @@ void InitTlsSize() {}
244
244
// On glibc x86_64, ThreadDescriptorSize() needs to be precise due to the usage
245
245
// of g_tls_size. On other targets, ThreadDescriptorSize() is only used by lsan
246
246
// to get the pointer to thread-specific data keys in the thread control block.
247
- # if (SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_SOLARIS) && \
248
- !SANITIZER_ANDROID && !SANITIZER_GO
247
+ # if (SANITIZER_FREEBSD || SANITIZER_GLIBC) && !SANITIZER_GO
249
248
// sizeof(struct pthread) from glibc.
250
249
static atomic_uintptr_t thread_descriptor_size;
251
250
251
+ // FIXME: Implementation is very GLIBC specific, but it's used by FREEBSD.
252
252
static uptr ThreadDescriptorSizeFallback () {
253
253
# if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
254
254
int major;
@@ -363,6 +363,10 @@ static uptr TlsPreTcbSize() {
363
363
}
364
364
# endif
365
365
366
+ # endif
367
+
368
+ # if (SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_SOLARIS) && \
369
+ !SANITIZER_ANDROID && !SANITIZER_GO
366
370
namespace {
367
371
struct TlsBlock {
368
372
uptr begin, end, align;
You can’t perform that action at this time.
0 commit comments