Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Potential memory leak in Parser/parser.c #101046

Closed
Labels
type-bugAn unexpected behavior, bug, or error
@RuiliF

Description

@RuiliF

Bug report

InParse/parse.c, function_loop0_1_rule (line 23809), object_children

  if (_n == _children_capacity) {      _children_capacity *= 2;      void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));      if (!_new_children) {          p->error_indicator = 1;          PyErr_NoMemory();          p->level--;          return NULL;       }           _children = _new_children;  }

IfPyMem_Realloc fails, the original object will be kept untouched. Thus returning NULL without free'ing_children will cause a memory leak.

Your environment

Python 3.12

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp