On Mon, Dec 3, 2012 at 1:18 PM, Jakub Jelinek <ja...@redhat.com> wrote:
> On Mon, Dec 03, 2012 at 11:06:48AM +0400, Konstantin Serebryany wrote:
>> This patch copies the asan tests almost, but not quite, verbatim from 
>> upstream.
>> Since the patch is not in attachment (and gmail messes up with inlined
>> patches) I can't see the exact changes.
>
> Sending patches inline rather than as attachments is the preferred way for
> gcc-patches, you can always grab it from the gcc-patches ml archive:
> http://gcc.gnu.org/ml/gcc-patches/2012-11/msg02557.html
> (then click on Raw text).

Got it, thanks.

>
> I'm attaching the diff for asan_test.cc from llvm anyway.
>
>> I see #ifdef ASAN_AVOID_EXPENSIVE_TESTS, which I don't really like
>> because I'd rather fix the test than disable it.
>
> The test isn't disabled, just by default limited to 30 threads instead of
> 1000, because that really will ruin testing for everybody with ulimit -u
> in 1024-ish range.  Even 500 threads would be undesirable for that.

Which is the same as disabling it.
Unfortunately, we don't have a good automated way to test asan performance,
so this test is guarding us from performance degradation in the asan's
pthread wrappers.
If there is a bug there, we may not notice it on 30 threads, but may
(with a high probability)
on 1000 threads.

Anyway, does http://llvm.org/viewvc/llvm-project?rev=169118&view=rev
solve the problem?
It adds ASAN_AVOID_EXPENSIVE_TESTS and checks the results of all
pthread_{create,join} calls in tests.

--kcc

>
>> Can we commit the tests 100% verbatim, and then fix them as separate commits
>> (preferably, by fixing the tests upstream and doing the merge with
>> libsanitizer/merge.sh)?
>
> I'd prefer delay committing the patch over causing random testsuite failures
> elsewhere.
>
>         Jakub

Reply via email to