[issue24828] Segfault when using store-context AST node in a load context

2020-10-16 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
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



[issue24828] Segfault when using store-context AST node in a load context

2020-10-16 Thread Xavier Morel


Xavier Morel  added the comment:

Should I close this since I believe 2.7 is not supported anymore?

--

___
Python tracker 

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



[issue24828] Segfault when using store-context AST node in a load context

2018-11-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
versions:  -Python 3.2

___
Python tracker 

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



[issue24828] Segfault when using store-context AST node in a load context

2018-09-22 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Reproducible on latest 2.7 branch as well. Stack trace as below : 

Program received signal SIGSEGV, Segmentation fault.
dict_set_item_by_hash_or_entry (
op={'code': , 'ast': , '__builtins__': , '__file__': 
'../backups/bpo24828.py', 'm': , id='foo', col_offset=0, 
lineno=1) at remote 0x1005c2790>, col_offset=0) at remote 0x1005c27d0>]) at 
remote 0x1005c2810>, '__package__': None, '__name__': '__main__', '__doc__': 
None}, key=, hash=,
value=, ep=) at Objects/dictobject.c:792
792 Py_INCREF(value);
(gdb) bt
#0  dict_set_item_by_hash_or_entry (op={'code': , 
'ast': , '__builtins__': , '__file__': '../backups/bpo24828.py', 'm': 
, 
id='foo', col_offset=0, lineno=1) at remote 0x1005c2790>, col_offset=0) at 
remote 0x1005c27d0>]) at remote 0x1005c2810>, '__package__': None, '__name__': 
'__main__', '__doc__': None}, key=, hash=, 
value=, ep=) at Objects/dictobject.c:792
#1  PyDict_SetItem (op={'code': , 'ast': , '__builtins__': , 
'__file__': '../backups/bpo24828.py', 'm': , id='foo', col_offset=0, 
lineno=1) at remote 0x1005c2790>, col_offset=0) at remote 0x1005c27d0>]) at 
remote 0x1005c2810>, '__package__': None, '__name__': '__main__', '__doc__': 
None}, key='foo', value=0x0) at Objects/dictobject.c:848
#2  0x0001000ab62e in PyEval_EvalFrameEx (f=, 
throwflag=) at Python/ceval.c:2186
#3  0x0001000a735a in PyEval_EvalCodeEx (co=, 
globals=, locals=, args=0x0, argcount=, kws=, kwcount=, defs=0x0, 
defcount=, closure=) at Python/ceval.c:3604
#4  0x0001000a6cb6 in PyEval_EvalCode (co=0x100293168, globals='foo', 
locals=0x0) at Python/ceval.c:669
#5  0x0001000a302a in builtin_eval (self={'code': , 'ast': , '__builtins__': , '__file__': '../backups/bpo24828.py', 'm': 
, 
id='foo', col_offset=0, lineno=1) at remote 0x1005c2790>, col_offset=0) at 
remote 0x1005c27d0>]) at remote 0x1005c2810>, '__package__': None, '__name__': 
'__main__', '__doc__': None}, args=) at Python/bltinmodule.c:679
#6  0x0001000ae8a7 in call_function (oparg=, 
pp_stack=) at Python/ceval.c:4372
#7  PyEval_EvalFrameEx (f=Frame 0x1002d4bc0, for file ../backups/bpo24828.py, 
line 7, in  (), throwflag=) at Python/ceval.c:3009
#8  0x0001000a735a in PyEval_EvalCodeEx (co=, 
globals=, locals=, args=0x0, argcount=, kws=, kwcount=, defs=0x0, 
defcount=, closure=) at Python/ceval.c:3604
#9  0x0001000a6cb6 in PyEval_EvalCode (co=0x100293168, globals='foo', 
locals=0x0) at Python/ceval.c:669
#10 0x0001000d4de4 in run_mod (mod=, filename=, globals={'code': , 'ast': , '__builtins__': , '__file__': 
'../backups/bpo24828.py', 'm': , id='foo', col_offset=0, 
lineno=1) at remote 0x1005c2790>, col_offset=0) at remote 0x1005c27d0>]) at 
remote 0x1005c2810>, '__package__': None, '__name__': '__main__', '__doc__': 
None}, locals={'code': , 'ast': , '__builtins__': , '__file__': 
'../backups/bpo24828.py', 'm': , id='foo', col_offset=0, 
lineno=1) at remote 0x1005c2790>, col_offset=0) at remote 0x1005c27d0>]) at 
remote 0x1005c2810>, '__package__': None, '__name__': '__main__', '__doc__': 
None}, flags=, arena=) at Python/pythonrun.c:1385
#11 PyRun_FileExFlags (fp=, filename=, 
start=, globals={'code': , 'ast': 
, '__builtins__': , 
'__file__': '../backups/bpo24828.py', 'm': , id='foo', col_offset=0, 
lineno=1) at remote 0x1005c2790>, col_offset=0) at remote 0x1005c27d0>]) at 
remote 0x1005c2810>, '__package__': None, '__name__': '__main__', '__doc__': 
None}, locals={'code': , 'ast': , '__builtins__': , '__file__': 
'../backups/bpo24828.py', 'm': , id='foo', col_offset=0, 
lineno=1) at remote 0x1005c2790>, col_offset=0) at remote 0x1005c27d0>]) at 
remote 0x1005c2810>, '__package__': None, '__name__': '__main__', '__doc__': 
None}, closeit=1, flags=) at Python/pythonrun.c:1371
#12 0x0001000d491a in PyRun_SimpleFileExFlags (fp=0x7fff71bec070, 
filename=0xc6079cb3d3de86bb , closeit=8, flags=0x7fff5fbffa70) at Python/pythonrun.c:957
#13 0x0001000ea8f2 in Py_Main (argc=, argv=) 
at Modules/main.c:645
#14 0x7fff8b5055c9 in start () from /usr/lib/system/libdyld.dylib
#15 0x7fff8b5055c9 in start () from /usr/lib/system/libdyld.dylib
#16 0x in ?? ()


Adding Benjamin since he is the 2.7 release manager and it's something specific 
to 2.7.


Thanks

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue24828] Segfault when using store-context AST node in a load context

2018-09-21 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the script. The crash is still reproducible as of now with at least 
python 2.7.14 . I need to check on the latest 2.7 branch yet.

On python 3 it produces an error as below : 

Traceback (most recent call last):
  File "../backups/bpo24828.py", line 6, in 
code = compile(m, '', mode='exec')
ValueError: expression must have Load context but has Store instead

Crash report on Mac OS

MacOS/Python
Identifier:Python
Version:   2.7.14 (2.7.14)
Code Type: X86-64 (Native)
Parent Process:zsh [13087]
Responsible:   iTerm2 [230]
User ID:   501

Date/Time: 2018-09-21 18:13:27.072 +0530
OS Version:Mac OS X 10.10.4 (14E46)
Report Version:11
Anonymous UUID:BCB9DD4C-B310-CA87-7308-42F6715FDA83

Sleep/Wake UUID:   FA788657-D625-40D6-8701-16E042836F5F

Time Awake Since Boot: 24000 seconds
Time Since Wake:   14000 seconds

Crashed Thread:0  Dispatch queue: com.apple.main-thread

Exception Type:EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:   KERN_INVALID_ADDRESS at 0x

VM Regions Near 0:
--> 
__TEXT 0001075be000-0001075c [8K] r-x/rwx 
SM=COW  
/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.python.python   0x0001075fc8bb 
dict_set_item_by_hash_or_entry + 14
1   org.python.python   0x00010764fa63 PyEval_EvalFrameEx + 
14664
2   org.python.python   0x00010764bf29 PyEval_EvalCodeEx + 
1583
3   org.python.python   0x00010764b8f4 PyEval_EvalCode + 54
4   org.python.python   0x000107647fdc builtin_eval + 570
5   org.python.python   0x0001076527c8 PyEval_EvalFrameEx + 
26285
6   org.python.python   0x00010764bf29 PyEval_EvalCodeEx + 
1583
7   org.python.python   0x00010764b8f4 PyEval_EvalCode + 54
8   org.python.python   0x00010766f05d run_mod + 53
9   org.python.python   0x00010766f100 PyRun_FileExFlags + 
133
10  org.python.python   0x00010766ec4f 
PyRun_SimpleFileExFlags + 698
11  org.python.python   0x0001076805f9 Py_Main + 3137
12  libdyld.dylib   0x7fff9354a5c9 start + 1

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0xc6079cb3d3de86bb  rbx: 0x0001077d3168  rcx: 0x  
rdx: 0xc6079cb3d3de86bb
  rdi: 0x0001077d3168  rsi: 0x0001078f4a08  rbp: 0x7fff586410d0  
rsp: 0x7fff586410c0
   r8: 0x   r9: 0x  r10: 0x0001  
r11: 0x0024e797
  r12: 0x000107871a00  r13: 0x000107871b70  r14: 0x0008  
r15: 0x0001078f4a08
  rip: 0x0001075fc8bb  rfl: 0x00010206  cr2: 0x


Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue24828] Segfault when using store-context AST node in a load context

2015-08-08 Thread Xavier Morel

New submission from Xavier Morel:

It looks to be fixed in 3.3 and up, but in Python 2.7

import ast
m = ast.Module(body=[
ast.Expr(value=ast.Name(id='foo', ctx=ast.Store()))
])
ast.fix_missing_locations(m)
code = compile(m, '', mode='exec')
eval(code)
 
will segfault on eval. So will a similarly incorrect ast.Attribute node.

Version tested:

Python 2.7.10 (default, May 28 2015, 12:02:55) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin

--
components: Library (Lib)
messages: 248269
nosy: xmorel
priority: normal
severity: normal
status: open
title: Segfault when using store-context AST node in a load context
type: crash
versions: Python 2.7, Python 3.2

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