New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
async_die_is_recursing: fix use of pthread_getspecific for Fedora #1072
Conversation
/preview |
Preview email sent as pull.1072.git.1635987016750.gitgitgadget@gmail.com |
/submit |
Submitted as pull.1072.git.1635990465854.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Carlo Arenas wrote (reply to this):
|
User |
On the Git mailing list, Jeff King wrote (reply to this):
|
User |
On the Git mailing list, Carlo Arenas wrote (reply to this):
|
This fix corrects an issue found in the `dockerized(pedantic, fedora)` CI build, first appearing after the introduction of a new version of the Fedora docker image version. This image includes a version of `glibc` with the attribute `__attr_access_none` added to `pthread_setspecific` [1], the implementation of which only exists for GCC 11.X - the version included in the Fedora image. The attribute requires that the pointer provided in the second argument of `pthread_getspecific` must, if not NULL, be a pointer to a valid object. In the usage in `async_die_is_recursing`, `(void *)1` is not valid, causing the error. This fix imitates a workaround added in SELinux [2] by using the pointer to the static `async_die_counter` itself as the second argument to `pthread_setspecific`. This guaranteed non-NULL, valid pointer matches the intent of the current usage while not triggering the build error. [1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=a1561c3bbe8 [2] https://lore.kernel.org/all/20211021140519.6593-1-cgzones@googlemail.com/ Co-authored-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Victoria Dye <vdye@github.com>
/submit |
Submitted as pull.1072.v2.git.1635998463474.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Jeff King wrote (reply to this):
|
On the Git mailing list, Jeff King wrote (reply to this):
|
On the Git mailing list, Junio C Hamano wrote (reply to this):
|
On the Git mailing list, Johannes Schindelin wrote (reply to this):
|
User |
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this):
|
User |
On the Git mailing list, Carlo Arenas wrote (reply to this):
|
On the Git mailing list, Derrick Stolee wrote (reply to this):
|
User |
On the Git mailing list, Johannes Schindelin wrote (reply to this):
|
This branch is now known as |
This patch series was integrated into seen via git@2541969. |
This patch series was integrated into next via git@b4fce69. |
On the Git mailing list, Junio C Hamano wrote (reply to this):
|
This patch series was integrated into seen via git@9cc14a5. |
This patch series was integrated into next via git@9cc14a5. |
This patch series was integrated into master via git@9cc14a5. |
This patch series was integrated into maint via git@5fbd2fc. |
Closed via 5fbd2fc. |
On the Git mailing list, Junio C Hamano wrote (reply to this):
|
Following up on Johannes' report earlier [1], this patch fixes a compiler error in the Fedora CI build (the same issue was identified in a local developer build about a week ago [2]). This fix changes the second argument in the call to
pthread_setspecific
from '(void *)1' to a valid pointer, thus preventing the error in the use of__attr_access_none
.Changes since V1
&ret
to&async_die_counter
("dummy" argument topthread_setspecific
) so that it's using a global (rather than local) variablepthread_getspecific
->pthread_setspecific
)[1] https://lore.kernel.org/git/nycvar.QRO.7.76.6.2111040007170.56@tvgsbejvaqbjf.bet/
[2] https://lore.kernel.org/git/43fe6d5c-bdb2-585c-c601-1da7a1b3ff8b@archlinux.org/
CC: gitster@pobox.com
CC: philipoakley@iee.email
CC: eschwartz@archlinux.org
cc: Carlo Arenas carenas@gmail.com
cc: Jeff King peff@peff.net
cc: Johannes Schindelin Johannes.Schindelin@gmx.de
cc: Ævar Arnfjörð Bjarmason avarab@gmail.com
cc: Derrick Stolee stolee@gmail.com