TCB size calculated in ThreadDescriptorSize() is wrong for glibc-2.14 #966
Comments
Do you mean to ask some one else from the glibc team? If you apply the patch like this, I'm afraid we won't have any way to test it. |
I sent the link at glibc mailing list.
Sure, unfortunately due to broken configure script I can't build the release on my local machine. |
|
Ok, so I was now able to verify that: typedef int TCB_SIZE_2304[sizeof(struct pthread)==1168? 1 : -1]; survives on glibc-2.14 with -m32. |
|
yes, please send a patch |
|
Summary: Fixes: google/sanitizers#966 Reviewers: kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D50131 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@338606 91177308-0d34-0410-b5e6-96231b3b80d8
Summary: Fixes: google/sanitizers#966 Reviewers: kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D50131
Summary: Fixes: google/sanitizers#966 Reviewers: kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D50131
------------------------------------------------------------------------ r338606 | kcc | 2018-08-01 20:29:51 +0200 (Wed, 01 Aug 2018) | 11 lines Fix sizeof(struct pthread) in glibc 2.14. Summary: Fixes: google/sanitizers#966 Reviewers: kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D50131 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_70@338691 91177308-0d34-0410-b5e6-96231b3b80d8
------------------------------------------------------------------------ r338606 | kcc | 2018-08-01 20:29:51 +0200 (Wed, 01 Aug 2018) | 11 lines Fix sizeof(struct pthread) in glibc 2.14. Summary: Fixes: google/sanitizers#966 Reviewers: kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D50131 ------------------------------------------------------------------------
------------------------------------------------------------------------ r338606 | kcc | 2018-08-01 20:29:51 +0200 (Wed, 01 Aug 2018) | 11 lines Fix sizeof(struct pthread) in glibc 2.14. Summary: Fixes: google/sanitizers#966 Reviewers: kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D50131 ------------------------------------------------------------------------
Summary: Fixes: google/sanitizers#966 Reviewers: kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D50131
------------------------------------------------------------------------ r338606 | kcc | 2018-08-01 20:29:51 +0200 (Wed, 01 Aug 2018) | 11 lines Fix sizeof(struct pthread) in glibc 2.14. Summary: Fixes: google/sanitizers#966 Reviewers: kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D50131 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_70@338691 91177308-0d34-0410-b5e6-96231b3b80d8
------------------------------------------------------------------------ r338606 | kcc | 2018-08-01 20:29:51 +0200 (Wed, 01 Aug 2018) | 11 lines Fix sizeof(struct pthread) in glibc 2.14. Summary: Fixes: google/sanitizers#966 Reviewers: kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D50131 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_70@338691 91177308-0d34-0410-b5e6-96231b3b80d8
------------------------------------------------------------------------ r338606 | kcc | 2018-08-01 20:29:51 +0200 (Wed, 01 Aug 2018) | 11 lines Fix sizeof(struct pthread) in glibc 2.14. Summary: Fixes: google/sanitizers#966 Reviewers: kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D50131 ------------------------------------------------------------------------ llvm-svn=338691
------------------------------------------------------------------------ r338606 | kcc | 2018-08-01 20:29:51 +0200 (Wed, 01 Aug 2018) | 11 lines Fix sizeof(struct pthread) in glibc 2.14. Summary: Fixes: google/sanitizers#966 Reviewers: kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D50131 ------------------------------------------------------------------------ llvm-svn: 338691
Copy of GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86022
In ThreadDescriptorSize(), I currently see:
This leads to assertion failure on glibc-2.14, with the same message as in bug 60038. Actual values for glibc 2.14 are the same as for 2.13: 1168 for i386 and 2304 for x86_64.
I checked this by appending the following to glibc-2.14.1/nptl/descr.h:
typedef int TCB_SIZE_2304[sizeof(struct pthread)==2304 ? -1 : 1];
typedef int TCB_SIZE_1168[sizeof(struct pthread)==1168 ? -1 : 1];
and getting corresponding error when compiling glibc on a 32-bit and on a 64-bit x86 Kubuntu machines.
I suppose the fix should be to change "minor <= 13" to "minor <= 14".
Can please anybody confirm the change for glibc? If so, I can create review request?
The text was updated successfully, but these errors were encountered: