Page MenuHomePhabricator

[compiler-rt][asan|win] Fix flaky unittest due to large allocations
ClosedPublic

Authored by etienneb on Feb 14 2017, 8:23 AM.

Details

Summary

Coverage is using large arrays which requires large allocations.
These allocations are flaky and often failing on win64.

We are using the 32-bits size until this gets a better fix.

Event Timeline

etienneb created this revision.Feb 14 2017, 8:23 AM
rnk accepted this revision.Feb 14 2017, 9:47 AM
rnk added inline comments.
lib/sanitizer_common/sanitizer_coverage_libcdep.cc
174–178

I don't think we need the #if:

static const uptr kTrEventArrayMaxSize =
    (SANITIZER_WORDSIZE == 32 || SANITIZER_WINDOWS) ? 1 << 22 : 1 << 30;
175–177

This comment should document what makes Windows special, and not just "the unittests fail unless we do this". Windows doesn't do overcommit (committed virtual memory costs swap), so programs can't reliably map such large amounts of virtual memory.

This revision is now accepted and ready to land.Feb 14 2017, 9:47 AM
rnk requested changes to this revision.Feb 14 2017, 9:47 AM
This revision now requires changes to proceed.Feb 14 2017, 9:47 AM
etienneb added inline comments.Feb 14 2017, 9:54 AM
lib/sanitizer_common/sanitizer_coverage_libcdep.cc
174–178

It won't affect linux 64-bit ?

174–178

ok, I saw your snipper.
fine.

etienneb updated this revision to Diff 88393.Feb 14 2017, 10:03 AM
etienneb edited edge metadata.
etienneb marked 4 inline comments as done.

rnk comments.

rnk accepted this revision.Feb 14 2017, 10:35 AM

lgtm

This revision is now accepted and ready to land.Feb 14 2017, 10:35 AM
etienneb closed this revision.Feb 14 2017, 11:08 AM