summaryrefslogtreecommitdiffstats
path: root/base/tools_sanity_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* CFI: Add a death test.pcc2015-07-311-0/+15
| | | | | | | | | BUG=464797 R=thakis@chromium.org Review URL: https://codereview.chromium.org/1264053002 Cr-Commit-Position: refs/heads/master@{#341235}
* Work around Clang's new -Wmismatched-new-delete warning.hans2015-05-191-2/+14
| | | | | | | | | | | | In r237368, Clang started warning about mismatched operator new[] and delete calls. This pacifies the warning by moving the operator new-call to a separate function. BUG=none Review URL: https://codereview.chromium.org/1131513006 Cr-Commit-Position: refs/heads/master@{#330528}
* Standardize usage of virtual/override/final in base/dcheng2014-10-211-6/+6
| | | | | | | | | BUG=417463 TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/668783004 Cr-Commit-Position: refs/heads/master@{#300447}
* replace OVERRIDE and FINAL with override and final in base/mostynb2014-10-071-3/+3
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/611153004 Cr-Commit-Position: refs/heads/master@{#298520}
* Avoid macro redefinition in tools_sanity_unittest.cctzik@chromium.org2014-07-181-4/+6
| | | | | | | | | | This causes build failure by macro redefinition on ASan-enabled build without -w flag. BUG=162783 Review URL: https://codereview.chromium.org/389313002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283978 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure ThreadSanitizer v2 reports a data race in ToolsSanityTest.DataRace.glider@chromium.org2014-06-261-4/+15
| | | | | | | | | | BUG=351259 R=phajdan@chromium.org TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/339893002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279994 0039d316-1c4b-4281-b951-d872f2087c98
* Add some function to induce ASan crashes.sebmarchand@chromium.org2014-06-141-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allows to induce ASan crashes in the browser and in the renderer processes, this is really useful when trying to debug an ASan crash (to make sure that the build is really instrumented). This code add the following crash urls to chrome: chrome://crash/browser-heap-overflow chrome://crash/browser-heap-underflow chrome://crash/browser-use-after-free chrome://crash/browser-corrupt-heap-block chrome://crash/browser-corrupt-heap Those URLs induce a crash in the browser process, while those: chrome://crash/heap-overflow chrome://crash/heap-underflow chrome://crash/use-after-free chrome://crash/corrupt-heap-block chrome://crash/corrupt-heap induce a crash in the renderer process. We need this because as these process use a different DLL (chrome.dll vs chrome_child.dll) one of them could be ASan-instrumented while the other one isn't... So the current code in renderer/ is useless for the browser-only instrumented builds... BUG= Review URL: https://codereview.chromium.org/306753003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277201 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 270383 "Reland https://codereview.chromium.org/276493002:..."glider@chromium.org2014-05-141-23/+12
| | | | | | | | | | | | | | | | | > Reland https://codereview.chromium.org/276493002: Enable ToolsSanityTest.SingleElementDeletedWithBraces and ToolsSanityTest.ArrayDeletedWithoutBraces under AddressSanitizer on Linux. > > Also make sure the tests aren't disabled under non-ASan on OSX. > > BUG=172614 > TBR=thakis@chromium.org > > Review URL: https://codereview.chromium.org/282843003 TBR=glider@chromium.org Review URL: https://codereview.chromium.org/288723003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270412 0039d316-1c4b-4281-b951-d872f2087c98
* Reland https://codereview.chromium.org/276493002: Enable ↵glider@chromium.org2014-05-141-12/+23
| | | | | | | | | | | | | ToolsSanityTest.SingleElementDeletedWithBraces and ToolsSanityTest.ArrayDeletedWithoutBraces under AddressSanitizer on Linux. Also make sure the tests aren't disabled under non-ASan on OSX. BUG=172614 TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/282843003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270383 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 270087 "Enable ToolsSanityTest.SingleElementDeletedWithBr..."zhaoqin@google.com2014-05-131-23/+12
| | | | | | | | | | | | | | | | | | | | | | | It breaks sanity checks of base_unittests on Mac (Valgrind)(1) bot: http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20Mac%20%28valgrind%29%281%29/builds/27512 08:30:53 memcheck_analyze.py [ERROR] FAIL! Sanity check failed! 08:30:53 memcheck_analyze.py [INFO] The following test errors were not handled: 08:30:53 memcheck_analyze.py [INFO] * 1x Memcheck sanity test 13 (single element deleted with []). 08:30:53 memcheck_analyze.py [INFO] * 1x Memcheck sanity test 12 (array deleted without []). > Enable ToolsSanityTest.SingleElementDeletedWithBraces and ToolsSanityTest.ArrayDeletedWithoutBraces under AddressSanitizer on Linux. > Make the tests free the memory to avoid leak reports from LSan. > > BUG=172614 > R=thakis@chromium.org > > Review URL: https://codereview.chromium.org/276493002 TBR=glider@chromium.org Review URL: https://codereview.chromium.org/282733007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270164 0039d316-1c4b-4281-b951-d872f2087c98
* Enable ToolsSanityTest.SingleElementDeletedWithBraces and ↵glider@chromium.org2014-05-131-12/+23
| | | | | | | | | | | | | ToolsSanityTest.ArrayDeletedWithoutBraces under AddressSanitizer on Linux. Make the tests free the memory to avoid leak reports from LSan. BUG=172614 R=thakis@chromium.org Review URL: https://codereview.chromium.org/276493002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270087 0039d316-1c4b-4281-b951-d872f2087c98
* Fix an ADDRESS_SANITIZER guard so that it works with SyzyASAN.chrisha@chromium.org2014-03-281-3/+3
| | | | | | | | BUG=357024 Review URL: https://codereview.chromium.org/217023002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260188 0039d316-1c4b-4281-b951-d872f2087c98
* Use SYZYASAN instead of ADDRESS_SANITIZER.chrisha@google.com2014-03-271-4/+4
| | | | | | | | | | | We've seen different failure related to the fact that we use the same flag without providing the same API and functionality. BUG= TBR=jamesr Review URL: https://codereview.chromium.org/212643015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259855 0039d316-1c4b-4281-b951-d872f2087c98
* Update base/tools_sanity_unittest.cc to cover MSan.earthdok@chromium.org2014-01-161-3/+12
| | | | | | | | | BUG=178409 R=thakis@chromium.org Review URL: https://codereview.chromium.org/139723002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245142 0039d316-1c4b-4281-b951-d872f2087c98
* Make gtest always use simple internal regex engine.mithro@mithis.com2013-12-181-4/+5
| | | | | | | | | | | | | | | | | | | | | | | In order to allow regex matches in gtest to be shared between Windows and other systems, we tell gtest to always use it's internal engine. The syntax supported by the internal engine initially looks like a subset of POSIX regexs. However character class shortcuts are not valid POSIX. Even more confusingly the system POSIX regex function often defines extra features not actually part of the standard allowing regex that work on Linux fail on Mac OS X. A search through the code base did not reveal any locations where features not supported by the internal regex engine where used. See bug https://code.google.com/p/chromium/issues/detail?id=317224 for more detailed description. BUG=317224 Review URL: https://codereview.chromium.org/55983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241500 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 239423 since it breaks base_unittests in linux, cros, mac valgrind bots.sadrul@chromium.org2013-12-101-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | """ > Make gtest always use simple internal regex engine. > > In order to allow regex matches in gtest to be shared between Windows and other > systems, we tell gtest to always use it's internal engine. > > The syntax supported by the internal engine initially looks like a subset of > POSIX regexs. However character class shortcuts are not valid POSIX. > > Even more confusingly the system POSIX regex function often defines extra > features not actually part of the standard allowing regex that work on Linux > fail on Mac OS X. > > A search through the code base did not reveal any locations where features not > supported by the internal regex engine where used. > > See bug https://code.google.com/p/chromium/issues/detail?id=317224 for more detailed description. > > BUG=317224 > > Review URL: https://codereview.chromium.org/55983002 TBR=mithro@mithis.com Review URL: https://codereview.chromium.org/107853004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239679 0039d316-1c4b-4281-b951-d872f2087c98
* Make gtest always use simple internal regex engine.mithro@mithis.com2013-12-091-4/+16
| | | | | | | | | | | | | | | | | | | | | | | In order to allow regex matches in gtest to be shared between Windows and other systems, we tell gtest to always use it's internal engine. The syntax supported by the internal engine initially looks like a subset of POSIX regexs. However character class shortcuts are not valid POSIX. Even more confusingly the system POSIX regex function often defines extra features not actually part of the standard allowing regex that work on Linux fail on Mac OS X. A search through the code base did not reveal any locations where features not supported by the internal regex engine where used. See bug https://code.google.com/p/chromium/issues/detail?id=317224 for more detailed description. BUG=317224 Review URL: https://codereview.chromium.org/55983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239423 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of the message_loop header in base/.avi@chromium.org2013-07-181-1/+1
| | | | | | | | | | BUG=260807 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/19224003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212281 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ToolsSanityTest.DataRace under TSan v1 by allocating the shared variable ↵glider@chromium.org2013-03-231-3/+4
| | | | | | | | | | | | on the heap instead of stack. For some reason the test interferes with others and the race on the stack variable gets ignored. BUG=223016 TBR=thestig,darin Review URL: https://codereview.chromium.org/13040003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190002 0039d316-1c4b-4281-b951-d872f2087c98
* Disable ToolsSanityTest.ArrayDeletedWithoutBraces and ↵glider@chromium.org2013-01-291-3/+12
| | | | | | | | | | | | | | ToolsSanityTest.SingleElementDeletedWithBraces under AddressSanitizer. Newer ASan detects an error in them, while older ones do not. We turn these tests off until the transition is finished. BUG=172614 TBR=brettw TEST=base_unittests remain green after the Clang roll. Review URL: https://codereview.chromium.org/12089018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179325 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for the tools sanity unittest when ADDRESS_SANITIZER is defined on Windows.sebmarchand@chromium.org2013-01-141-2/+3
| | | | | | | | | | | | The way we report an asan error is different on Windows, we use a RPC server to be able to get stack traces etc from the sandboxed processes. This make the tools sanity tests to fail on Windows. We should have some specific tests for Windows, but for now we should disable those tests on Windows. BUG= Review URL: https://chromiumcodereview.appspot.com/11753029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176705 0039d316-1c4b-4281-b951-d872f2087c98
* Do not use EXPECT_DEATH with ASan on iOS.glider@chromium.org2012-10-241-8/+27
| | | | | | | TBR=mark Review URL: https://codereview.chromium.org/11272008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163826 0039d316-1c4b-4281-b951-d872f2087c98
* Tweak Memcheck sanity tests to avoid duplicate reports.eugenis@google.com2012-05-161-2/+2
| | | | | | | | | BUG=128264 TEST=ToolsSanityTest under valgrind TBR=jar Review URL: https://chromiumcodereview.appspot.com/10383208 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137383 0039d316-1c4b-4281-b951-d872f2087c98
* Add virtual and OVERRIDE to base/ implementation filesrsleevi@chromium.org2012-04-061-7/+7
| | | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/10004001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131098 0039d316-1c4b-4281-b951-d872f2087c98
* Change code in base (primarily unit tests) to use Sleep(TimeDelta).tedvessenes@gmail.com2011-12-311-3/+3
| | | | | | | | | | BUG=108171 TEST= Review URL: http://codereview.chromium.org/9055001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116065 0039d316-1c4b-4281-b951-d872f2087c98
* More sanity unittests to make sure AddressSanitizer is instrumenting the code.glider@chromium.org2011-11-081-1/+26
| | | | | | Review URL: http://codereview.chromium.org/8491013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108994 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent clang from optimizing away a variable.thakis@chromium.org2011-11-011-1/+2
| | | | | | | | | | | | | It looks like clang recently learned how to optimize away more stuff. This should hopefully fix Memcheck sanity test 1. BUG=102355 TEST=Bots on the memory.fyi waterfall go green Review URL: http://codereview.chromium.org/8429008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108095 0039d316-1c4b-4281-b951-d872f2087c98
* Add a sanity test that crashes under ASan. This should be used to check that ↵glider@chromium.org2011-10-121-0/+8
| | | | | | | | the tests are built correctly. Review URL: http://codereview.chromium.org/8240010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105108 0039d316-1c4b-4281-b951-d872f2087c98
* Actually run the sanity tests under AddressSanitizer.glider@chromium.org2011-10-051-15/+33
| | | | | | Review URL: http://codereview.chromium.org/8116028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104093 0039d316-1c4b-4281-b951-d872f2087c98
* gcc 4.6 warnings cleanuppph34r@gmail.com2011-09-301-0/+1
| | | | | | | | | | BUG=87490 TEST=compile with gcc 4.6 Review URL: http://codereview.chromium.org/8050008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103513 0039d316-1c4b-4281-b951-d872f2087c98
* mac: Try to fix valgrind sanity tests 14 and 15.thakis@chromium.org2011-09-181-1/+4
| | | | | | | | | | | | | See http://code.google.com/p/chromium/issues/detail?id=96945#c4 Not the nicest patch, but it's what we get for writing tests that explicitly rely on undefined behavior with optimizations enabled. BUG=96945 TEST=valgrind sanity tests 14 and 15 go green on the mac memory bot Review URL: http://codereview.chromium.org/7931012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101700 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent clang from optimizing away 2 variables.thakis@chromium.org2011-09-181-2/+4
| | | | | | | | | | | Hopefully fixes Memcheck sanity tests 12 and 13. BUG=96945 TEST=none Review URL: http://codereview.chromium.org/7931006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101698 0039d316-1c4b-4281-b951-d872f2087c98
* Add more ThreadSanitizer sanity teststimurrrr@chromium.org2011-05-101-32/+83
| | | | | | | | | | | | | | | 1) A test that makes sure we handle annotations correctly (BenignRace) 2) A test that makes sure we correctly use the ignore file These tests will help us in investigating http://code.google.com/p/chromium/issues/detail?id=82114 and prevent further mis-handling appear misteriously. BUG=82114 TEST=./tools/valgrind/chrome_tests.sh -t base --tool tsan --gtest_filter="*Sanity*" Review URL: http://codereview.chromium.org/6994009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84812 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enable positive OOB write tests under Dr. Memory and add the suppression ↵timurrrr@chromium.org2011-02-221-8/+0
| | | | | | | | | | | for these tests. TEST=DrM bot shouldn't be affected after landing this. Before DrM r175 it would crash BUG=http://code.google.com/p/drmemory/issues/detail?id=51 TBR=bruening Review URL: http://codereview.chromium.org/6538092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75598 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/thread.h to base/threading, fix up callers to use the new location.brettw@chromium.org2011-01-011-1/+1
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6028009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70345 0039d316-1c4b-4281-b951-d872f2087c98
* Move platform_thread to base/threading and put in the base namespace. I left abrettw@chromium.org2010-12-311-1/+5
| | | | | | | | | | | stub and "using" declarations in the old location to avoid having to change the entire project at once. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6001010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70342 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Valgrind unittests by forcing illegal memory accesses to happen ↵pkasting@chromium.org2010-10-181-2/+4
| | | | | | | | | | unconditionally. BUG=none TEST=none Review URL: http://codereview.chromium.org/3838006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62992 0039d316-1c4b-4281-b951-d872f2087c98
* ** Think this may have caused TabSwitchingTest to fail, as it is parsing log ↵tim@chromium.org2010-10-181-3/+3
| | | | | | | | | | | | | | | | | files. ** Revert 62959 - Convert LOG(INFO) to VLOG(1) - base/. Also removes an "else" after "return" and aligns "<<" per style guide. BUG=none TEST=none Review URL: http://codereview.chromium.org/3845002 TBR=pkasting@chromium.org Review URL: http://codereview.chromium.org/3850006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62981 0039d316-1c4b-4281-b951-d872f2087c98
* Convert LOG(INFO) to VLOG(1) - base/.pkasting@chromium.org2010-10-181-3/+3
| | | | | | | | | | Also removes an "else" after "return" and aligns "<<" per style guide. BUG=none TEST=none Review URL: http://codereview.chromium.org/3845002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62959 0039d316-1c4b-4281-b951-d872f2087c98
* Copied Evan's http://codereview.chromium.org/3691007 (base_unittests: moveglider@chromium.org2010-10-141-8/+8
| | | | | | | | | local functions into an anonymous namespace) and made the necessary changes to sanity suppressions. Review URL: http://codereview.chromium.org/3765002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62521 0039d316-1c4b-4281-b951-d872f2087c98
* Update Dr. Memory suppressions, gtest_filters and also skip oob-write sanity ↵timurrrr@chromium.org2010-10-011-0/+8
| | | | | | | | | tests on Windows. TBR=glider Review URL: http://codereview.chromium.org/3616001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61171 0039d316-1c4b-4281-b951-d872f2087c98
* Quick-fix the compliation error on Windowstimurrrr@chromium.org2010-09-231-1/+1
| | | | | | | TBR=phajdan.jr,glider Review URL: http://codereview.chromium.org/3413032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60272 0039d316-1c4b-4281-b951-d872f2087c98
* Add two tests for uninit reads to ToolsSanityTeststimurrrr@chromium.org2010-09-231-0/+9
| | | | | | | TEST=./tools/valgrind/chrome_tests.sh -t base --gtest_filter="Sanity*" on Linux and Mac Review URL: http://codereview.chromium.org/3470006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60271 0039d316-1c4b-4281-b951-d872f2087c98
* Revert debugging printf()s occasionally landed in r50350glider@chromium.org2010-06-211-1/+0
| | | | | | | | TBR=tim Review URL: http://codereview.chromium.org/2818018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50352 0039d316-1c4b-4281-b951-d872f2087c98
* Make the memory waterfall green -- more suppressions for bug 19775.glider@chromium.org2010-06-211-1/+1
| | | | | | | | | BUG=19775 TBR=tim Review URL: http://codereview.chromium.org/2870016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50350 0039d316-1c4b-4281-b951-d872f2087c98
* Reverted an occasional change to ToolsSanityTests brought by r49524glider@chromium.org2010-06-111-1/+1
| | | | | | | | TBR=timurrrr Review URL: http://codereview.chromium.org/2758008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49525 0039d316-1c4b-4281-b951-d872f2087c98
* Suppress another leak from bug 46343.glider@chromium.org2010-06-111-1/+1
| | | | | | | | | | | Suppress bug 46345 BUG=46345,46343 TBR=jam,darin Review URL: http://codereview.chromium.org/2779017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49524 0039d316-1c4b-4281-b951-d872f2087c98
* Update dynamic annotations and move them to base/third_partytimurrrr@chromium.org2010-05-141-1/+1
| | | | | | Review URL: http://codereview.chromium.org/1992005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47252 0039d316-1c4b-4281-b951-d872f2087c98
* Implement more sanity tests for Memcheck/Valgrindtimurrrr@chromium.org2010-03-261-1/+67
| | | | | | Review URL: http://codereview.chromium.org/1242008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42751 0039d316-1c4b-4281-b951-d872f2087c98
* Add sleep into data race sanity test since it fails on TSan x64 FYI bot (too ↵timurrrr@chromium.org2010-03-051-1/+5
| | | | | | | | | | fast?) TBR=glider TEST=TSAN x64 FYI bot should become green Review URL: http://codereview.chromium.org/668176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40778 0039d316-1c4b-4281-b951-d872f2087c98