Fix thread-local storage bugs on aarch64

This change fixes an issue where .tbss memory might not be initialized.
This commit is contained in:
Justine Tunney 2024-05-08 04:03:51 -07:00
parent 793393a341
commit ae2a7ac844
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
6 changed files with 93 additions and 65 deletions

View file

@ -255,7 +255,7 @@ static int __sigaction(int sig, const struct sigaction *act,
// xnu silicon claims to support sa_resethand but it does nothing
// this can be tested, since it clears the bit from flags as well
if (!rc && oldact &&
(((struct sigaction_silicon *)ap)->sa_flags & SA_RESETHAND)) {
(((struct sigaction_silicon *)oldact)->sa_flags & SA_RESETHAND)) {
((struct sigaction_silicon *)oldact)->sa_flags |= SA_RESETHAND;
}
}