This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author turicas
Recipients turicas
Date 2018-08-29.04:20:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1535516450.51.0.56676864532.issue34539@psf.upfronthosting.co.za>
In-reply-to
Content
I was working on a library called rows[https://github.com/turicas/rows] when a segmentation fault was thrown in the moment I've tried to read a CSV file. Since this part of the code is implemented completely in Python, I thought it could be a bug in Python itself.
Investigating the code I found it was faulting at exec()'s line inside namedtuple code (Lib/collections/__init__.py). After some time testing, I've came up with this piece of code to reproduce it:

```
try:
    float('áxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
except:
    from collections import namedtuple
    namedtuple('T', 'f')
```

The code works if I:
- Run passing `PYTHONMALLOC=debug`
- Place 'from collections import namedtuple' into the first line
- Remove any char from the string in the 'float(...)' line
- Remove the 'á' from the string in the 'float(...)' line

I've tested the code on Python 3.6.6, 3.7.0, 3.7-dev and 3.8-dev (versions installed using pyenv on a Debian GNU/Linux machine) and the problem happened only in 3.7.0.
This issue seems to be related to https://bugs.python.org/issue34087 but I preferred to create a new one since I don't know if there are automated tests for this specific case.
History
Date User Action Args
2018-08-29 04:20:50turicassetrecipients: + turicas
2018-08-29 04:20:50turicassetmessageid: <1535516450.51.0.56676864532.issue34539@psf.upfronthosting.co.za>
2018-08-29 04:20:50turicaslinkissue34539 messages
2018-08-29 04:20:49turicascreate