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 — Memory leak when reading co_code attribute of deepfrozen code objects · Issue #93728 · python/cpython

Memory leak when reading co_code attribute of deepfrozen code objects  #93728

New issue
Copy link
New issue
Copy link
Closed
#93729
Closed
Memory leak when reading co_code attribute of deepfrozen code objects #93728
#93729
Copy link
Assignees
kumaraditya303
Labels
3.12only security fixesonly security fixes

Description

@kumaraditya303
kumaraditya303
opened on Jun 11, 2022
Issue body actions

Reproducer:

import os
os.path.join.__code__.co_code

Relevant Valgrind Report:

==21416== HEAP SUMMARY:
==21416==     in use at exit: 397 bytes in 1 blocks
==21416==   total heap usage: 19,728 allocs, 19,727 frees, 2,629,532 bytes allocated
==21416== 
==21416== 397 bytes in 1 blocks are still reachable in loss record 1 of 1
==21416==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==21416==    by 0x2FA6DD: _PyMem_RawMalloc (obmalloc.c:101)
==21416==    by 0x2FC5CD: PyObject_Malloc (obmalloc.c:713)
==21416==    by 0x287BDC: _PyBytes_FromSize (bytesobject.c:103)
==21416==    by 0x2881A6: PyBytes_FromStringAndSize (bytesobject.c:136)
==21416==    by 0x29F609: _PyCode_GetCode (codeobject.c:1374)
==21416==    by 0x29F69B: code_getcode (codeobject.c:1728)
==21416==    by 0x2A31B2: getset_get (descrobject.c:202)
==21416==    by 0x2F86E6: _PyObject_GenericGetAttrWithDict (object.c:1269)
==21416==    by 0x2F8F14: PyObject_GenericGetAttr (object.c:1357)
==21416==    by 0x2F9864: PyObject_GetAttr (object.c:912)
==21416==    by 0x3B5B16: _PyEval_EvalFrameDefault (ceval.c:3472)
==21416== 
==21416== LEAK SUMMARY:
==21416==    definitely lost: 0 bytes in 0 blocks
==21416==    indirectly lost: 0 bytes in 0 blocks
==21416==      possibly lost: 0 bytes in 0 blocks
==21416==    still reachable: 397 bytes in 1 blocks
==21416==         suppressed: 0 bytes in 0 blocks
==21416== 

This is a 3.12 only regression caused by #93382.

Activity

  1. kumaraditya303
    added
    3.12only security fixesonly security fixes
    on Jun 11, 2022
  2. kumaraditya303
    self-assigned this
    on Jun 11, 2022
  3. kumaraditya303 commented on Jun 11, 2022

    @kumaraditya303
    kumaraditya303
    on Jun 11, 2022
    ContributorAuthor
    More actions

    @Fidget-Spinner Can you cherry-pick my fix #93729 to your backport PR #93493?

  4. Fidget-Spinner commented on Jun 11, 2022

    @Fidget-Spinner
    Fidget-Spinner
    on Jun 11, 2022
    Member
    More actions

    Thanks for catching this, and sure thing.

  5. Fidget-Spinner
    added
    release-blocker
    on Jun 11, 2022
  6. Fidget-Spinner
    added this to Release and Deferred blockers 🚫on Jun 11, 2022
  7. Fidget-Spinner
    closed this as completedin #93729on Jun 12, 2022
  8. Fidget-Spinner
    added a commit that references this issue on Jun 12, 2022

    gh-93728: fix memory leak in deepfrozen code objects (GH-93729)

    8f728e5
  9. Fidget-Spinner
    removed
    release-blocker
    on Jun 12, 2022
  10. Fidget-Spinner
    moved this to Done in Release and Deferred blockers 🚫on Jun 12, 2022
  11. Fidget-Spinner
    removed this from Release and Deferred blockers 🚫on Jun 12, 2022
  12. serhiy-storchaka
    added a commit that references this issue on Jun 26, 2022

    Revert 30935 defer bpo45162 to 312 (#94285)

    1ffde3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @kumaraditya303
    kumaraditya303

Labels

3.12only security fixesonly security fixes

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.