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

2018-09-24 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

Thanks Álvaro for the report and script. As part of triaging I am closing this 
as out of date since this bug seemed to have been fixed with issue34087 and is 
not reproducible on latest master and 3.7 branch. Feel free to reopen this if 
needed.

Thanks again!

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



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

2018-08-30 Thread Álvaro Justen

Álvaro Justen  added the comment:

Yes, I think it was fixed in https://bugs.python.org/issue34087 (didn't see the 
commits), I just wanted to report it because I don't know if a test for this 
specific case is needed (the other bug is not related to namedtuples).

--

___
Python tracker 

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



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

2018-08-30 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



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

2018-08-29 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

If this is only present in 3.7.0 and not in the current branches, it implies 
there was an exec() or ceval-loop bug in that release and it has been already 
fixed.

This bug report may be out-of-date.

--

___
Python tracker 

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



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

2018-08-29 Thread Álvaro Justen

Álvaro Justen  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 

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



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

2018-08-29 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The works for me.  Can you try it on a fresh build or install of Python 3.7?

--
nosy: +rhettinger

___
Python tracker 

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



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

2018-08-28 Thread Álvaro Justen

New submission from Álvaro Justen :

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('áxxx')
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.

--
components: Library (Lib)
files: namedtuple_bug.py
messages: 324300
nosy: turicas
priority: normal
severity: normal
status: open
title: namedtuple's exec() throws segmentation fault
type: crash
versions: Python 3.7
Added file: https://bugs.python.org/file47772/namedtuple_bug.py

___
Python tracker 

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