This is an archive of the discontinued LLVM Phabricator instance.

[msan][test] Use a large cpusetsize for pthread_getaffinity_np
ClosedPublic

Authored by MaskRay on Jun 8 2022, 6:26 PM.

Details

Summary

pthread_getaffinity_np (Linux kernel/sched/core.c:sched_getaffinity) fails
with EINVAL if 8*cpusetsize (constant in glibc: 1024) is smaller than
nr_cpu_ids (CONFIG_NR_CPUS, which is 2048 for several arch/powerpc/configs
configurations).

The build bot clang-ppc64le-linux-lnt seems to have a larger nr_cpu_ids.

Diff Detail

Event Timeline

MaskRay created this revision.Jun 8 2022, 6:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2022, 6:26 PM
MaskRay requested review of this revision.Jun 8 2022, 6:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2022, 6:26 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
MaskRay edited the summary of this revision. (Show Details)Jun 8 2022, 6:48 PM

I'll push this, hopefully we can avoid UNSUPPORTED: powerpc

vitalybuka accepted this revision.Jun 8 2022, 6:50 PM
This revision is now accepted and ready to land.Jun 8 2022, 6:50 PM
This revision was landed with ongoing or failed builds.Jun 8 2022, 6:50 PM
This revision was automatically updated to reflect the committed changes.

Thanks for the fix!