Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddressSanitizerInterface.GetOwnershipStressTest affects the run-time of other tests #77

Closed
ramosian-glider opened this issue Aug 31, 2015 · 3 comments

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 77

Reproduce (x86_64 linux): 

% ./bin_linux/asan_test64 --gtest_filter=AddressSanitizerInterface.GetOwnershipStressTest:AddressSanitizer.OOB_*
2>&1 | grep OK
[       OK ] AddressSanitizerInterface.GetOwnershipStressTest (3854 ms)
[       OK ] AddressSanitizer.OOB_char (5224 ms)
[       OK ] AddressSanitizer.OOB_int (5208 ms)


./bin_linux/asan_test64 --gtest_filter=AddressSanitizer.OOB_* 2>&1 | grep OK
[       OK ] AddressSanitizer.OOB_char (760 ms)
[       OK ] AddressSanitizer.OOB_int (794 ms)

I suspect that multiple mallocs in AddressSanitizerInterface.GetOwnershipStressTest
interfere with the death tests in AddressSanitizer.OOB_char somehow. 

Reported by konstantin.s.serebryany on 2012-06-05 13:23:41

@ramosian-glider
Copy link
Member Author

Simple experiment: 

TEST(AddressSanitizer, MultipleDeathTest) {                                       


  for (int i = 0; i < 100; i++) {                                                 


    EXPECT_DEATH(exit(1), "");                                                    


  }                                                                               


}                                                                                 





TEST(AddressSanitizer, MultipleDeathAndMallocTest) {                              


  free_aaa(malloc_aaa(1 << 29));                                                  


  for (int i = 0; i < 100; i++) {                                                 


    EXPECT_DEATH(exit(1), "");                                                    


  }                                                                               


}                

The first test runs < 2 seconds, the second test runs 10 seconds.
Looks like the cost of the death test depends on the amount of reserved memory. 
Oh my...  

Reported by konstantin.s.serebryany on 2012-06-05 13:36:27

@ramosian-glider
Copy link
Member Author

Fixed by reordering tests (r157997.)

Reported by konstantin.s.serebryany on 2012-06-05 13:49:57

  • Status changed: Fixed

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:12:59

  • Labels added: ProjectAddressSanitizer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant