[issue33153] interpreter crash when multiplying large tuples

2020-11-29 Thread Irit Katriel


Change by Irit Katriel :


--
stage:  -> resolved

___
Python tracker 

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



[issue33153] interpreter crash when multiplying large tuples

2020-11-29 Thread Irit Katriel


Change by Irit Katriel :


--
stage: resolved -> 

___
Python tracker 

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



[issue33153] interpreter crash when multiplying large tuples

2020-11-29 Thread Irit Katriel


Irit Katriel  added the comment:

This is a python 2-only issue.

--
nosy: +iritkatriel
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



[issue33153] interpreter crash when multiplying large tuples

2019-05-08 Thread Inada Naoki


Inada Naoki  added the comment:

This bug is happened only on x86, not amd64.

--

___
Python tracker 

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



[issue33153] interpreter crash when multiplying large tuples

2019-05-07 Thread Mark Shannon


Mark Shannon  added the comment:

I can't reproduce on 2.7.15rc1 on an x64 machine.
Can you confirm that this is still an issue?

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue33153] interpreter crash when multiplying large tuples

2018-03-27 Thread Ivan Zakharyaschev

Ivan Zakharyaschev  added the comment:

It was run in i586 chroot on x86_64.

--

___
Python tracker 

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



[issue33153] interpreter crash when multiplying large tuples

2018-03-27 Thread Ivan Zakharyaschev

Ivan Zakharyaschev  added the comment:

The traceback:

[builder@localhost ~]$ python -c 'x = ("a", "b") * 2**20; x *= 2**20'
Segmentation fault (core dumped)
[builder@localhost ~]$ gdb python core.23284 
GNU gdb (GDB) 7.9-alt4 (ALT)
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-alt-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...Reading symbols from 
/usr/lib/debug/usr/bin/python2.7.debug...done.
done.

warning: core file may not match specified executable file.
[New LWP 23284]
Warning: couldn't activate thread debugging using libthread_db: Cannot find new 
threads: generic error
Warning: couldn't activate thread debugging using libthread_db: Cannot find new 
threads: generic error

warning: Unable to find libthread_db matching inferior's thread library, thread 
debugging will not be available.
Warning: couldn't activate thread debugging using libthread_db: Cannot find new 
threads: generic error
Warning: couldn't activate thread debugging using libthread_db: Cannot find new 
threads: generic error

warning: Unable to find libthread_db matching inferior's thread library, thread 
debugging will not be available.
Core was generated by `python -c x = ("a", "b") * 2**20; x *= 2**20'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  tuplerepeat (a=0xf694301c, n=1048576) at Objects/tupleobject.c:503
503 *p = items[j];
(gdb) bt
#0  tuplerepeat (a=0xf694301c, n=1048576) at Objects/tupleobject.c:503
#1  0xf7546d47 in sequence_repeat (n=0x80a83ac, seq=0xf694301c, 
repeatfunc=0xf75b24a0 ) at Objects/abstract.c:1210
#2  PyNumber_InPlaceMultiply (v=0xf694301c, w=0x80a83ac) at 
Objects/abstract.c:1374
#3  0xf7602ff8 in PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:1653
#4  0xf7608fee in PyEval_EvalCodeEx (co=0xf71a8ba8, globals=0xf7240714, 
locals=0xf7240714, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, 
defcount=0, closure=0x0) at Python/ceval.c:3589
#5  0xf760916e in PyEval_EvalCode (co=0xf71a8ba8, globals=0xf7240714, 
locals=0xf7240714) at Python/ceval.c:669
#6  0xf762c508 in run_mod (arena=0x8068320, flags=0xffa1a82c, 
locals=0xf7240714, globals=0xf7240714, filename=0xf765fec9 "", 
mod=) at Python/pythonrun.c:1376
#7  PyRun_StringFlags (str=0x804b160 "x = (\"a\", \"b\") * 2**20; x *= 
2**20\n", start=257, globals=0xf7240714, locals=0xf7240714, flags=0xffa1a82c) 
at Python/pythonrun.c:1339
#8  0xf762e160 in PyRun_SimpleStringFlags (command=0x804b160 "x = (\"a\", 
\"b\") * 2**20; x *= 2**20\n", flags=0xffa1a82c) at Python/pythonrun.c:974
#9  0xf764498e in Py_Main (argc=, argv=) at 
Modules/main.c:589
#10 0x080484f7 in main (argc=3, argv=0xffa1a974) at Modules/python.c:20
(gdb) quit
[builder@localhost ~]$ 

It was built like this -- 
http://git.altlinux.org/tasks/archive/done/_188/193020/build/100/i586/log :

i586-alt-linux-gcc -pthread -c -fno-strict-aliasing -pipe -Wall -g -O3 
-march=i586 -mtune=generic -DNDEBUG -pipe -Wall -g -O3 -march=i586 
-mtune=generic  -I. -IInclude -I./Include  -fPIC -DPy_BUILD_CORE -o 
Objects/tupleobject.o Objects/tupleobject.c

The same happens with gcc7-7.3.1-alt3 here -- 
http://git.altlinux.org/tasks/202598/build/100/i586/log .

--

___
Python tracker 

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



[issue33153] interpreter crash when multiplying large tuples

2018-03-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

tuplerepeat() in Objects/tupleobject.c uses a questionable check that relies on 
signed integer overflow. It is a matter of time when this rifle will shoot in 
the foot. But I didn't expected issues with old good gcc 6.3. Was the 
interpreter compiled with non-standard options or ran on non-x86 platform?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33153] interpreter crash when multiplying large tuples

2018-03-27 Thread INADA Naoki

INADA Naoki  added the comment:

Would you paste traceback?

--
nosy: +inada.naoki

___
Python tracker 

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



[issue33153] interpreter crash when multiplying large tuples

2018-03-27 Thread Ivan Zakharyaschev

New submission from Ivan Zakharyaschev :

The issue https://bugs.python.org/msg314475 has arisen for tuples (but not for 
lists, as in the example there) in 2.7.14 for me. How should we fix it in a 
better way?

This bug is not reproducible in python 3.5.4.

[builder@localhost ~]$ python
Python 2.7.14 (default, Nov  7 2017, 17:07:17) 
[GCC 6.3.1 20170118 (ALT 6.3.1-alt2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x = [0] * 2**20
>>> x *= 2**20
Traceback (most recent call last):
  File "", line 1, in 
MemoryError
>>> x = [0,0,0,0,0,0] * 2**20
>>> x *= 2**20
Traceback (most recent call last):
  File "", line 1, in 
MemoryError
>>> x = ('a', 'b')
>>> x = ('a', 'b') * 2**20
>>> x *= 2**20
Segmentation fault
[builder@localhost ~]$ python --version
Python 2.7.14
[builder@localhost ~]$ python
Python 2.7.14 (default, Nov  7 2017, 17:07:17) 
[GCC 6.3.1 20170118 (ALT 6.3.1-alt2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxsize
2147483647
>>> sys.maxint
2147483647
>>> 
[builder@localhost ~]$ python RPM/BUILD/Python-2.7.14/Lib/test/test_tuple.py
test_addmul (__main__.TupleTest) ... ok
test_bigrepeat (__main__.TupleTest) ... Segmentation fault
[builder@localhost ~]$

--
components: Interpreter Core
messages: 314508
nosy: imz
priority: normal
severity: normal
status: open
title: interpreter crash when multiplying large tuples
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue33153] interpreter crash when multiplying large tuples

2018-03-27 Thread Ivan Zakharyaschev

Ivan Zakharyaschev  added the comment:

I meant the old issue https://bugs.python.org/issue1704621 .

--

___
Python tracker 

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