[issue34539] namedtuple's exec() throws segmentation fault

Álvaro Justen report at bugs.python.org
Wed Aug 29 10:25:58 EDT 2018


Álvaro Justen <alvarojusten at gmail.com> added the comment:

I've cloned the cpython git repository and made fresh builds here:

On v.3.6.6 (4cf1f54eb764f856fda5a394d8598c0c90d69d77) it works:

    $ git checkout v3.6.6 && ./configure && make && ./python --version && ./python namedtuple_bug.py
    [...compilation lines supressed...]
    Python 3.6.6

On the v.3.7.0 (1bf9cc509326bc42cd8cb1650eb9bf64550d817e) it segfaults:

    $ git checkout v3.7.0 && make clean && ./configure && make && ./python --version && ./python namedtuple_bug.py
    [...compilation lines supressed...]
    Python 3.7.0
    Segmentation fault

On the most recent 3.7 branch (65ef7425a32ee411d8047a4fad0fc6bb9ff733b1) it works:

    $ git checkout 3.7 && make clean && ./configure && make && ./python --version && ./python namedtuple_bug.py
    [...compilation lines supressed...]
    Python 3.7.0+

On master branch (2c8ddcf4f14f3e4c87a6fe6678ab5ad09130c6ab) it also works:

    $ git checkout master && make clean && ./configure && make && ./python --version && ./python namedtuple_bug.py
    [...compilation lines supressed...]
    Python 3.8.0a0

Note: I've tried to add a `print('works!')` at the end of the script, so we can see the result when it does not segfault, but adding this actually make it works on all versions; removing this line has the behaviour reported above.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34539>
_______________________________________


More information about the Python-bugs-list mailing list