This is an archive of the discontinued LLVM Phabricator instance.

sanitizers: turn thread-safety errors into warnings
ClosedPublic

Authored by dvyukov on Aug 10 2021, 7:21 AM.

Details

Summary

There were 2 issues reported on https://reviews.llvm.org/D105716:

  1. FreeBSD phtread.h is annotated with thread-safety attributes

and this causes errors in gtest headers.

  1. If sanitizers are compiled with an older versions of clang

(which supports the annotations, but has some false positives
in analysis not present in later versions of clang), compilation
fails with errors.

Switch the errors to warnings by default.
Some CI bots enable COMPILER_RT_ENABLE_WERROR, which should
turn these warnings back into errors.

Diff Detail

Event Timeline

dvyukov created this revision.Aug 10 2021, 7:21 AM
dvyukov requested review of this revision.Aug 10 2021, 7:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2021, 7:21 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
nikic accepted this revision.Aug 10 2021, 8:17 AM

LGTM, thanks!

This revision is now accepted and ready to land.Aug 10 2021, 8:17 AM
This revision was automatically updated to reflect the committed changes.