This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Fixed a bug when displaying affinity
ClosedPublic

Authored by tianshilei1992 on Nov 11 2020, 5:04 PM.

Details

Summary

Currently the affinity format string has initial value. When users set
the format via OMP_AFFINITY_FORMAT, it will overwrite the format string. However,
when copying the format, the tailing null is missing. As a result, if the user
format string is shorter than default value, the remaining part in the default
value still makes effort. This bug is not exposed because the test case doesn't
check the end of a string. It only checks whether given output "contains" the
check string.

Diff Detail

Event Timeline

tianshilei1992 created this revision.Nov 11 2020, 5:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 11 2020, 5:04 PM
tianshilei1992 requested review of this revision.Nov 11 2020, 5:04 PM

Rebased the patch to fix the two failed cases...

AndreyChurbanov accepted this revision.Nov 12 2020, 10:11 AM
AndreyChurbanov added a subscriber: AndreyChurbanov.

LGTM

Thanks

This revision is now accepted and ready to land.Nov 12 2020, 10:11 AM
This revision was automatically updated to reflect the committed changes.