summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralkondratenko@gmail.com <alkondratenko@gmail.com@6b5cf1ce-ec42-a296-1ba9-69fdba395a50>2013-07-26 19:35:20 +0000
committeralkondratenko@gmail.com <alkondratenko@gmail.com@6b5cf1ce-ec42-a296-1ba9-69fdba395a50>2013-07-26 19:35:20 +0000
commit6d4ad4428bb8f587d890fa5b7a76ba65dcf48dcb (patch)
tree35c72a5f10ba2ca5caf9d61fad3f8dadc06b4a64
parentbe54c3f3ed192eabab9b075ec924d2479a956b9d (diff)
downloadgperftools-6d4ad4428bb8f587d890fa5b7a76ba65dcf48dcb.tar.gz
issue-556: drop malloc limit at the end of page_heap_test
Which otherwise causes somewhat weird stack overflow on release windows builds. git-svn-id: http://gperftools.googlecode.com/svn/trunk@230 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
-rw-r--r--src/tests/page_heap_test.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/page_heap_test.cc b/src/tests/page_heap_test.cc
index 817b69b..97f6fad 100644
--- a/src/tests/page_heap_test.cc
+++ b/src/tests/page_heap_test.cc
@@ -154,5 +154,12 @@ int main(int argc, char **argv) {
TestPageHeap_Stats();
TestPageHeap_Limit();
printf("PASS\n");
+ // on windows as part of library destructors we call getenv which
+ // calls malloc which fails due to our exhausted heap limit. It then
+ // causes fancy stack overflow because log message we're printing
+ // for failed allocation somehow cause malloc calls too
+ //
+ // To keep us out of trouble we just drop malloc limit
+ FLAGS_tcmalloc_heap_limit_mb = 0;
return 0;
}