tangyouling added inline comments.

================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:269
   val = FIRST_32_SECOND_64(1152, 1776);
+#elif SANITIZER_LOONGARCH64
+  val = 1936;
----------------
MaskRay wrote:
> We should add new code in this fallback function. The generic code handles 
> all new ports.
> 
> It's incorrect to assume that sizeof(pthread) stays 1936 as new glibc 
> versions can add more fields.
> We should add new code in this fallback function. The generic code handles 
> all new ports.
> 
> It's incorrect to assume that sizeof(pthread) stays 1936 as new glibc 
> versions can add more fields.

By looking at D119007, I can see that the val value obtained from 
`_thread_db_sizeof_pthread` is 1856 (glibc version 2.36).

Is it correct to change the `ThreadDescriptorSizeFallback` to the following,
```
#elif SANITIZER_LOONGARCH64
  val = 1856;
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138489/new/

https://reviews.llvm.org/D138489

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to