projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd108f7
)
Fixing AtomicHashArrayTest ASan Test Failure
author
Jonathan Kron
<jkron@fb.com>
Thu, 25 Feb 2016 02:36:30 +0000
(18:36 -0800)
committer
facebook-github-bot-1
<folly-bot@fb.com>
Thu, 25 Feb 2016 03:20:27 +0000
(19:20 -0800)
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
folly/test/AtomicHashArrayTest.cpp
patch
|
blob
|
history
diff --git
a/folly/test/AtomicHashArrayTest.cpp
b/folly/test/AtomicHashArrayTest.cpp
index 87abd4862e9d72e7521c8ef500339b81595c4e6b..5c3eb70a1fcbd22deacad008048d5916f2b35bd6 100644
(file)
--- a/
folly/test/AtomicHashArrayTest.cpp
+++ b/
folly/test/AtomicHashArrayTest.cpp
@@
-304,7
+304,10
@@
static bool legalKey(char* a) {
TEST(Aha, LookupAny) {
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);
{
// Look up a single char, successfully.
@@
-331,5
+334,7
@@
TEST(Aha, LookupAny) {
EXPECT_TRUE(res.first != arr->end());
}
- for (auto it : *arr) free(it.first);
+ for (auto it : *arr) {
+ free(it.first);
+ }
}