diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-18 07:00:12 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-18 07:00:12 +0000 |
commit | b5ba7746d06d92f1c49b710546137b19e4b3b563 (patch) | |
tree | 27ca328069b5ee97f0bfcd090dfb77c2d051234f /utils | |
parent | 2fdd8dbb2729855ba3bd815727e0c2743ee5d16d (diff) | |
download | external_llvm-b5ba7746d06d92f1c49b710546137b19e4b3b563.zip external_llvm-b5ba7746d06d92f1c49b710546137b19e4b3b563.tar.gz external_llvm-b5ba7746d06d92f1c49b710546137b19e4b3b563.tar.bz2 |
Avoid a problem in libc_freeres() seen on a linux-i686 buildbot when running
under valgrind:
==19577== Invalid free() / delete / delete[]
==19577== at 0x4C9C866: free (vg_replace_malloc.c:325)
==19577== by 0x5121104: ??? (in /lib/libc-2.10.2.so)
==19577== by 0x4C97412: _vgnU_freeres (vg_preloaded.c:62)
==19577== by 0x5041486: __run_exit_handlers (exit.c:93)
==19577== by 0x50414FE: exit (exit.c:100)
==19577== by 0x5028B5C: (below main) (libc-start.c:254)
==19577== Address 0xffffffff is not stack'd, malloc'd or (recently) free'd
==19577==
Apparently this happens under certain versions of glibc, so valgrind provides
the --run-libc-freeres=no option to avoid calling freeres(). This may increase
the number of "still reachable" blocks valgrind reports, but we don't care
about those, while this error breaks the buildbots.
There are upstream bugs about this at
http://sourceware.org/bugzilla/show_bug.cgi?id=10610 and
http://bugs.kde.org/show_bug.cgi?id=167483, but they don't look likely to be
fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/lit/lit/TestFormats.py | 2 | ||||
-rw-r--r-- | utils/lit/lit/TestRunner.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/utils/lit/lit/TestFormats.py b/utils/lit/lit/TestFormats.py index 6ab3f9c..33fd1c1 100644 --- a/utils/lit/lit/TestFormats.py +++ b/utils/lit/lit/TestFormats.py @@ -73,7 +73,7 @@ class GoogleTest(object): cmd = [testPath, '--gtest_filter=' + testName] if litConfig.useValgrind: - valgrindArgs = ['valgrind', '-q', + valgrindArgs = ['valgrind', '-q', '--run-libc-freeres=no', '--tool=memcheck', '--trace-children=yes', '--error-exitcode=123'] valgrindArgs.extend(litConfig.valgrindArgs) diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py index d5bd01f..2778469 100644 --- a/utils/lit/lit/TestRunner.py +++ b/utils/lit/lit/TestRunner.py @@ -253,7 +253,7 @@ def executeTclScriptInternal(test, litConfig, tmpBase, commands, cwd): return (Test.FAIL, "Tcl 'exec' parse error on: %r" % ln) if litConfig.useValgrind: - valgrindArgs = ['valgrind', '-q', + valgrindArgs = ['valgrind', '-q', '--run-libc-freeres=no', '--tool=memcheck', '--trace-children=yes', '--error-exitcode=123'] valgrindArgs.extend(litConfig.valgrindArgs) @@ -339,7 +339,7 @@ def executeScript(test, litConfig, tmpBase, commands, cwd): if litConfig.useValgrind: # FIXME: Running valgrind on sh is overkill. We probably could just # run on clang with no real loss. - valgrindArgs = ['valgrind', '-q', + valgrindArgs = ['valgrind', '-q', '--run-libc-freeres=no', '--tool=memcheck', '--trace-children=yes', '--error-exitcode=123'] valgrindArgs.extend(litConfig.valgrindArgs) |