[issue35973] `growable_int_array type_ignores` in parsetok.c is not always freed.

2019-02-12 Thread Brennan Vincent


Brennan Vincent  added the comment:

Hi Guido,

I have tried applying your patch. It seems to fix the issue (Valgrind no longer 
reports memory definitely lost).

--

___
Python tracker 
<https://bugs.python.org/issue35973>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35973] `growable_int_array type_ignores` in parsetok.c is not always freed.

2019-02-11 Thread Brennan Vincent


New submission from Brennan Vincent :

To reproduce:

(1) build python: `../configure --prefix=$HOME/prefix --with-pydebug 
--without-pymalloc && make install`

(2) run with valgrind: `valgrind --leak-check=full ~/prefix/bin/python3`

(3) exit immediately from the interpreter by pressing ^D

(4) Note the following output from Valgrind:

```
==3810071== 40 bytes in 1 blocks are definitely lost in loss record 3 of 527
==3810071==at 0x4C28B5F: malloc (vg_replace_malloc.c:299)
==3810071==by 0x59ED58: growable_int_array_init (parsetok.c:27)
==3810071==by 0x59EE14: parsetok (parsetok.c:235)
==3810071==by 0x59F697: PyParser_ParseFileObject (parsetok.c:176)
==3810071==by 0x522E85: PyParser_ASTFromFileObject (pythonrun.c:1224)
==3810071==by 0x5231E9: PyRun_InteractiveOneObjectEx (pythonrun.c:238)
==3810071==by 0x5234D0: PyRun_InteractiveLoopFlags (pythonrun.c:120)
==3810071==by 0x523BF2: PyRun_AnyFileExFlags (pythonrun.c:78)
==3810071==by 0x4204FE: pymain_run_stdin (main.c:1185)
==3810071==by 0x42126B: pymain_run_python (main.c:1675)
==3810071==by 0x422EE0: pymain_main (main.c:1820)
==3810071==by 0x422F75: _Py_UnixMain (main.c:1857)
```

Reproduced on git commit hash 522346d792d9013140a3f4ad3534ac10f38d9085 .

--
components: Interpreter Core
messages: 335274
nosy: umanwizard
priority: normal
severity: normal
status: open
title: `growable_int_array type_ignores` in parsetok.c is not always freed.
type: resource usage
versions: Python 3.8

___
Python tracker 
<https://bugs.python.org/issue35973>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com