Page MenuHomePhabricator

[TSan] Align default value of `detect_deadlocks` flag with actual behavior
ClosedPublic

Authored by yln on Dec 18 2018, 12:01 PM.

Details

Summary

I tricked myself into thinking that deadlock detection is off by default in TSan by looking at the default value of the detect_deadlocks flag and outdated docs. (Created a pull request to update docs.)
I even managed to confuse others: https://groups.google.com/forum/#!topic/thread-sanitizer/xYvnAYwtoDk

However, the default value is overwritten in code (TSan_flags.cc:InitializeFlags). The TSan/deadlock tests also rely on this

This changes aligns the default value of the flag with the actual default behavior.

Diff Detail

Event Timeline

yln created this revision.Dec 18 2018, 12:01 PM
Herald added subscribers: Restricted Project, llvm-commits, kubamracek. ยท View Herald TranscriptDec 18 2018, 12:01 PM
yln retitled this revision from [TSan] Align default value of `detect_deadlock` flag with actual beh to [TSan] Align default value of `detect_deadlocks` flag with actual behavior.Dec 18 2018, 12:11 PM
yln edited the summary of this revision. (Show Details)
yln added reviewers: kubamracek, dvyukov, dcoughlin.
yln added a project: Restricted Project.
dvyukov accepted this revision.Dec 19 2018, 1:36 AM

Thanks!
Merging this now.

This revision is now accepted and ready to land.Dec 19 2018, 1:36 AM
dvyukov closed this revision.Dec 19 2018, 1:37 AM

Merged as 349609.