diff options
author | Collin Winter <collinw@gmail.com> | 2010-03-17 02:08:57 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2010-03-17 02:08:57 (GMT) |
commit | 58bee59b4e4353f53e5151a25c6bb1ac73623233 (patch) | |
tree | f5aa9e3cbfb046bd5b2ac67bc2f9645f864c08a6 | |
parent | f2bf2b3ec4a15e479933c136f2ccbde0a45a3f8e (diff) | |
download | cpython-58bee59b4e4353f53e5151a25c6bb1ac73623233.zip cpython-58bee59b4e4353f53e5151a25c6bb1ac73623233.tar.gz cpython-58bee59b4e4353f53e5151a25c6bb1ac73623233.tar.bz2 |
Merged revisions 79013 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79013 | collin.winter | 2010-03-16 19:02:30 -0700 (Tue, 16 Mar 2010) | 1 line
Fix a trivial class of (hypothetical, future) false-positive refleaks, discovered by an optimization in Unladen Swallow's past (which will become CPython's future).
........
-rwxr-xr-x | Lib/test/regrtest.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index a9db105..e9ca477 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -1010,13 +1010,14 @@ def dash_R(the_module, test, indirect_test, huntrleaks): sys.stderr.flush() dash_R_cleanup(fs, ps, pic, zdc, abcs) for i in range(repcount): - rc = sys.gettotalrefcount() + rc_before = sys.gettotalrefcount() run_the_test() sys.stderr.write('.') sys.stderr.flush() dash_R_cleanup(fs, ps, pic, zdc, abcs) + rc_after = sys.gettotalrefcount() if i >= nwarmup: - deltas.append(sys.gettotalrefcount() - rc - 2) + deltas.append(rc_after - rc_before) print(file=sys.stderr) if any(deltas): msg = '%s leaked %s references, sum=%s' % (test, deltas, sum(deltas)) |