[issue21433] "False = True" produces segfault

2014-05-04 Thread Samuel Ainsworth

New submission from Samuel Ainsworth:

Running this:

>>> False = True
Segmentation fault: 11

gives me this:

Process: Python [17911]
Path:
/Library/Frameworks/Python.framework/Versions/3.3/Resources/Python.app/Contents/MacOS/Python
Identifier:  Python
Version: 3.3.1 (3.3.1)
Code Type:   X86-64 (Native)
Parent Process:  bash [5092]
Responsible: Terminal [298]
User ID: 501

Date/Time:   2014-05-05 00:55:57.270 -0400
OS Version:  Mac OS X 10.9.2 (13C1021)
Report Version:  11
Anonymous UUID:  B5997910-F526-88BB-2135-BD6152A81709

Sleep/Wake UUID: 88A9925C-46FC-488E-B7A5-EBB1AAE6BAC1

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 0001-00011000 [4K] r-x/rwx 
SM=COW  
/Library/Frameworks/Python.framework/Versions/3.3/Resources/Python.app/Contents/MacOS/Python

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   readline.so 0x0001006e1f57 call_readline + 647
1   org.python.python   0x00018182 PyOS_Readline + 274
2   org.python.python   0x0001a048 tok_nextc + 104
3   org.python.python   0x0001a6f1 tok_get + 97
4   org.python.python   0x0001bb61 PyTokenizer_Get + 17
5   org.python.python   0x00018294 parsetok + 212
6   org.python.python   0x000100105253 PyParser_ASTFromFile 
+ 131
7   org.python.python   0x000100105459 
PyRun_InteractiveOneFlags + 281
8   org.python.python   0x0001001057ce 
PyRun_InteractiveLoopFlags + 78
9   org.python.python   0x0001001070e1 PyRun_AnyFileExFlags 
+ 161
10  org.python.python   0x00010011dade Py_Main + 3454
11  org.python.python   0x00010e1c 0x1 + 3612
12  org.python.python   0x00010c74 0x1 + 3188

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x  rbx: 0x00010220  rcx: 0x00010220  
rdx: 0x0a00
  rdi: 0x  rsi: 0x0001006e221c  rbp: 0x7fff5fbff210  
rsp: 0x7fff5fbff140
   r8: 0x00010220   r9: 0x  r10: 0x0001  
r11: 0x0001
  r12: 0x0001  r13: 0x000c  r14: 0x0001001fb678  
r15: 0x7fff5fbff1d0
  rip: 0x0001006e1f57  rfl: 0x00010206  cr2: 0x
  
Logical CPU: 1
Error Code:  0x0004
Trap Number: 14


Binary Images:
   0x1 -0x10ff7 +org.python.python (3.3.1 - 3.3.1) 
<152E1B23-6F4F-E37A-CB7A-862C4D3D1FBD> 
/Library/Frameworks/Python.framework/Versions/3.3/Resources/Python.app/Contents/MacOS/Python
   0x13000 -0x1001cbff7 +org.python.python (3.3.1, [c] 
2004-2013 Python Software Foundation. - 3.3.1) 
<0328F41B-A30B-2BBA-D4C3-FA2E5DE4FCA1> 
/Library/Frameworks/Python.framework/Versions/3.3/Python
   0x1003f3000 -0x1003f4ff7 +_heapq.so (???) 
<1C40E27A-FBFA-6B43-9AA9-9FCDF1961459> 
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/_heapq.so
   0x1006e -0x1006e2ff7 +readline.so (???) 
<5D0B15E6-1E61-AA6F-3915-27BBA7D83F4C> 
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so
   0x1020f1000 -0x10210fffb  libedit.2.dylib (39) 
<1B0596DB-F336-32E7-BB9F-51BF70DB5305> /usr/lib/libedit.2.dylib
   0x10212 -0x102174fe7 +libncursesw.5.dylib (5) 
 
/Library/Frameworks/Python.framework/Versions/3.3/lib/libncursesw.5.dylib
0x7fff6343f000 - 0x7fff63472817  dyld (239.4) 
<2B17750C-ED1B-3060-B64E-21897D08B28B> /usr/lib/dyld
0x7fff894f4000 - 0x7fff894faff7  libsystem_platform.dylib (24.90.1) 
<3C3D3DA8-32B9-3243-98EC-D89B9A1670B3> /usr/lib/system/libsystem_platform.dylib
0x7fff89931000 - 0x7fff89958ff7  libsystem_network.dylib (241.3) 
<8B1E1F1D-A5CC-3BAE-8B1E-ABC84337A364> /usr/lib/system/libsystem_network.dylib
0x7fff89b7f000 - 0x7fff89b80ff7  libsystem_blocks.dylib (63) 
 /usr/lib/system/libsystem_blocks.dylib
0x7fff89fd5000 - 0x7fff89fd9ff7  libcache.dylib (62) 
 /usr/lib/system/libcache.dylib
0x7fff8a21f000 - 0x7fff8a228ff3  libsystem_notify.dylib (121) 
<52571EC3-6894-37E4-946E-064B021ED44E> /usr/lib/system/libsystem_notify.dylib
0x7fff8a52f000 - 0x7fff8a536fff  libcompiler_rt.dylib (35) 
<4CD916B2-1B17-362A-B403-EF24A1DAC141> /usr/lib/system/libcompiler_rt.dylib
0x7fff8b144000 - 0x7fff8b146ff3  libsystem_configuration.dylib (596.13) 
 
/usr/lib/system/libsystem_configuration.dylib
0x7fff8c3b4000 - 0x7fff8c3ddff7  libc++abi.dylib (49.1) 
<21A807

[issue21433] "False = True" produces segfault

2014-05-04 Thread Samuel Ainsworth

Changes by Samuel Ainsworth :


--
type:  -> crash

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



[issue26361] lambda in dict comprehension is broken

2016-02-14 Thread Samuel Ainsworth

New submission from Samuel Ainsworth:

If we construct a dict as follows,

x = {t: lambda x: x * t for t in range(5)}

then `x[0](1)` evaluates to 4! Tested on 2.7 and 3.5.

--
messages: 260287
nosy: Samuel.Ainsworth
priority: normal
severity: normal
status: open
title: lambda in dict comprehension is broken
type: behavior
versions: Python 2.7, Python 3.5

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



[issue26361] lambda in dict comprehension is broken

2016-02-14 Thread Samuel Ainsworth

Samuel Ainsworth added the comment:

Also applies to list comprehensions. For example, 

lst = [(lambda x: x * t) for t in range(5)]
lst[0](1)   # => 4

--

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