[cfe-dev] ASAN HugeMallocTest fails

Alp Toker alp at nuanti.com
Mon Dec 2 05:13:32 PST 2013


On 02/12/2013 13:08, Kostya Serebryany wrote:
>
>
>
> On Mon, Dec 2, 2013 at 4:30 PM, Alp Toker <alp at nuanti.com 
> <mailto:alp at nuanti.com>> wrote:
>
>
>     On 02/12/2013 11:05, Kostya Serebryany wrote:
>
>
>
>
>         On Mon, Dec 2, 2013 at 2:55 PM, İsmail Dönmez
>         <ismail at donmez.ws <mailto:ismail at donmez.ws>
>         <mailto:ismail at donmez.ws <mailto:ismail at donmez.ws>>> wrote:
>
>             This is under kvm with 3GB RAM (-m 3000)
>
>         This test tests the ability to allocate 4.1Gb RAM.
>         It will have to be disabled on small RAM machines somehow.
>         Or you can run it with 6Gb RAM. This test has been there for
>         quite a while
>         and you are the first to complain
>
>
>     I imagine there aren't more complaints because people are just
>     disabling asan on their builders to avoid the cost.
>
>     Regardless of whether it's a low-end or high-end system with
>     hundreds of gigabytes RAM, the 4.1 Gb a single test allocates
>     could probably be put to better uses such as additional builders.
>
>
>         , so maybe running with 6Gb is the right approach.
>
>
>     How about gating this behind ASAN_AVOID_EXPENSIVE_TESTS?
>
>
> Like this?
> --- asan/tests/asan_test.cc     (revision 196066)
> +++ asan/tests/asan_test.cc     (working copy)
> @@ -299,7 +299,7 @@
>  }
>  TEST(AddressSanitizer, HugeMallocTest) {
> -  if (SANITIZER_WORDSIZE != 64) return;
> +  if (SANITIZER_WORDSIZE != 64 || ASAN_AVOID_EXPENSIVE_TESTS) return;
>    size_t n_megs = 4100;
>    TestLargeMalloc(n_megs << 20);
>  }

Brilliant, that should do the trick.

Thanks kcc

Alp.


-- 
http://www.nuanti.com
the browser experts




More information about the cfe-dev mailing list