This is an archive of the discontinued LLVM Phabricator instance.

[tsan] Inherit TSAN_OPTIONS in allocator_returns_null.cc testcase
AbandonedPublic

Authored by kubamracek on Nov 13 2015, 2:01 AM.

Details

Summary

This fixes the test on OS X by inheriting the default TSAN_OPTIONS (set in lit.cfg). Namely, we get abort_on_error=0, so the process doesn't crash.

Diff Detail

Event Timeline

kubamracek updated this revision to Diff 40121.Nov 13 2015, 2:01 AM
kubamracek retitled this revision from to [tsan] Inherit TSAN_OPTIONS in allocator_returns_null.cc testcase.
kubamracek updated this object.
kubamracek added reviewers: dvyukov, kcc, glider, samsonov.
dvyukov accepted this revision.Nov 13 2015, 9:27 AM
dvyukov edited edge metadata.

LGTM because it can be useful to run tests with custom TSAN_OPTIONS supplied in env.
However, I wonder why do we enable abort_on_error on Mac default (it is not enabled on other OSes), and then disable it as more useful behavior. Won't users also suffer from abort_on_error=1?
I've hit it with Go runtime on Mac. It also lead to a bad behavior and I disabled it for Go on Mac.
Should not we just switch the default to 0?

This revision is now accepted and ready to land.Nov 13 2015, 9:27 AM
samsonov edited edge metadata.Nov 13 2015, 11:44 AM

I suggest you implement %env_tsan_opts= replacement similar to %env_asan_opts.

samsonov requested changes to this revision.Nov 13 2015, 11:44 AM
samsonov edited edge metadata.
This revision now requires changes to proceed.Nov 13 2015, 11:44 AM