FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-101747: Fix refleak in new `OrderedDict` repr by sobolevn · Pull Request #101748 · python/cpython · GitHub

/ cpython Public

gh-101747: Fix refleak in new OrderedDict repr - #101748

Merged
rhettinger merged 2 commits into
python:mainfrom
sobolevn:issue-101747
Feb 10, 2023
Merged

gh-101747: Fix refleak in new OrderedDict repr#101748
rhettinger merged 2 commits into
python:mainfrom
sobolevn:issue-101747

Conversation

sobolevn commented Feb 9, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

After: ./python.exe -m test -v test_ordered_dict -R 3:3

Ran 279 tests in 1.460s

OK
.

== Tests result: SUCCESS ==

1 test OK.

Total duration: 10.2 sec
Tests result: SUCCESS

sobolevn requested a review from corona10 February 9, 2023 17:10
corona10 added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Feb 9, 2023

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @corona10 for commit f8adfe9 🤖

If you want to schedule another build, you need to add the :hammer: test-with-refleak-buildbots label again.

bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Feb 9, 2023

Copy link
Copy Markdown
Contributor

The aarch64 RHEL8 refleak bot still reports a leak. Could you please examine, @sobolevn?

Comment thread Objects/odictobject.c Outdated

Done:
Py_ReprLeave((PyObject *)self);
Py_XDECREF(dcopy);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

You can move it above the Done label and change Py_XDECREF to Py_DECREF.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks, it might be a slightly more readable! I will wait for all tests to finish and apply it :)

sobolevn commented Feb 9, 2023

Copy link
Copy Markdown
Member Author

@erlend-aasland it reports:

test_importlib leaked [6, 4, 2] references, sum=12
test_importlib leaked [4, 4, 2] memory blocks, sum=10

I think these leaks are not related 🤔

Should I fix it here?

Copy link
Copy Markdown
Contributor

Should I fix it here?

I prefer one fix per PR; that makes it easier to bisect in case something goes wrong, and it also makes for a cleaner git history.

sobolevn commented Feb 9, 2023

Copy link
Copy Markdown
Member Author

@erlend-aasland then I consider this done:

  1. Review suggestion is applied
  2. New issue is created: Refleak in test_importlib on aarch64 RHEL8 #101766

corona10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm

corona10 commented Feb 9, 2023

Copy link
Copy Markdown
Member

I will merge this PR after waiting for @serhiy-storchaka approval

test_importlib leaked [6, 4, 2] references, sum=12

I can not reproduce the issue on my macOS. It sounds like we have to debug on the RHEL machine.

rhettinger merged commit 34c50ce into python:main Feb 10, 2023
carljm added a commit to carljm/cpython that referenced this pull request Feb 10, 2023
* main:
  Fix some typos in asdl_c.py (pythonGH-101757)
  pythongh-101747: Fix refleak in new `OrderedDict` repr (pythonGH-101748)
  pythongh-101430: Update tracemalloc to handle presize properly. (pythongh-101745)
  pythonGH-101228: Fix typo in docstring for read method of `_io.TextIOWrapper` class (python#101227)
  Fix typo in `test_fstring.py` (python#101600)
  pythongh-101726: Update the OpenSSL version to 1.1.1t (pythonGH-101727)
  pythongh-101283: Fix 'versionchanged' for the shell=True fallback on Windows in 3.12 (pythonGH-101728)
  LibFFI build requires x64 Cygwin, and skip the ARM build (pythonGH-101743)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL