Commit 2203c927 authored by Jonathan Kron's avatar Jonathan Kron Committed by facebook-github-bot-1

Fixing AtomicHashArrayTest ASan Test Failure

Summary: Both of these tests will unavoidably fail on ASan because of shared library loads, and indestructable objects.  Disabling ASAN testing for these test files.

Reviewed By: yfeldblum

Differential Revision: D2968169

fb-gh-sync-id: d2acc71b40541af5e10f15d5087a7c07da05453d
shipit-source-id: d2acc71b40541af5e10f15d5087a7c07da05453d
parent fd108f7f
...@@ -304,7 +304,10 @@ static bool legalKey(char* a) { ...@@ -304,7 +304,10 @@ static bool legalKey(char* a) {
TEST(Aha, LookupAny) { TEST(Aha, LookupAny) {
auto arr = AHACstrInt::create(12); auto arr = AHACstrInt::create(12);
arr->insert(std::make_pair(strdup("f"), 42)); char* f_char = strdup("f");
SCOPE_EXIT { free(f_char); };
arr->insert(std::make_pair(f_char, 42));
EXPECT_EQ(42, arr->find("f")->second); EXPECT_EQ(42, arr->find("f")->second);
{ {
// Look up a single char, successfully. // Look up a single char, successfully.
...@@ -331,5 +334,7 @@ TEST(Aha, LookupAny) { ...@@ -331,5 +334,7 @@ TEST(Aha, LookupAny) {
EXPECT_TRUE(res.first != arr->end()); EXPECT_TRUE(res.first != arr->end());
} }
for (auto it : *arr) free(it.first); for (auto it : *arr) {
free(it.first);
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment