GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test_doctest are leaked · Issue #106843 · python/cpython

test_doctest are leaked #106843

New issue
Copy link
New issue
Copy link
Closed
Closed
test_doctest are leaked#106843
Copy link
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@Eclips4
Eclips4
opened on Jul 17, 2023
Issue body actions

Tried on current main.

 ./python -m test -R 3:3 test_doctest
Running Debug|x64 interpreter...
0:00:00 Run tests sequentially
0:00:00 [1/1] test_doctest
beginning 6 repetitions
123456
<frozen importlib._bootstrap>:824: ImportWarning: TestImporter.exec_module() not found; falling back to load_module()
.<frozen importlib._bootstrap>:824: ImportWarning: TestImporter.exec_module() not found; falling back to load_module()
.<frozen importlib._bootstrap>:824: ImportWarning: TestImporter.exec_module() not found; falling back to load_module()
.<frozen importlib._bootstrap>:824: ImportWarning: TestImporter.exec_module() not found; falling back to load_module()
.<frozen importlib._bootstrap>:824: ImportWarning: TestImporter.exec_module() not found; falling back to load_module()
.<frozen importlib._bootstrap>:824: ImportWarning: TestImporter.exec_module() not found; falling back to load_module()
.
test_doctest leaked [34, 34, 34] memory blocks, sum=102
test_doctest failed (reference leak) in 34.8 sec

== Tests result: FAILURE ==

1 test failed:
    test_doctest

Total duration: 34.9 sec
Tests result: FAILURE

Linked PRs

  • gh-106843: fix memleak in _PyCompile_CleanDoc #106846

Activity

  1. Eclips4
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jul 17, 2023
  2. Eclips4 commented on Jul 17, 2023

    @Eclips4
    Eclips4
    on Jul 17, 2023
    MemberAuthor
    More actions

    Bisected to #106411
    cc @methane

  3. AlexWaygood
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    on Jul 17, 2023
  4. sunmy2019 commented on Jul 18, 2023

    @sunmy2019
    sunmy2019
    on Jul 18, 2023
    Member
    More actions

    This fixes the problem.

    diff --git a/Python/compile.c b/Python/compile.c
    index b80f7c01bcd..6a144f30164 100644
    --- a/Python/compile.c
    +++ b/Python/compile.c
    @@ -8060,7 +8060,9 @@ _PyCompile_CleanDoc(PyObject *doc)
         }
     
         Py_DECREF(doc);
    -    return PyUnicode_FromStringAndSize(buff, w - buff);
    +    PyObject* res = PyUnicode_FromStringAndSize(buff, w - buff);
    +    PyMem_Free(buff);
    +    return res;
     }
     
  5. methane commented on Jul 18, 2023

    @methane
    methane
    on Jul 18, 2023
    Member
    More actions

    thanks

  6. methane
    added a commit that references this issue on Jul 18, 2023

    gh-106843: fix memleak in _PyCompile_CleanDoc (#106846)

    ece3b9d
  7. sunmy2019
    closed this as completedon Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.