[issue26508] Infinite crash leading to DoS

2016-03-09 Thread STINNER Victor
STINNER Victor added the comment: "Then it is no bug that it crashes python?" The bug is your program creating inconsistent data. Without ctypes, you cannot create such inconsistent data. "Is a crash not a bug?" There are various ways to "crash" Python, but most of them are deliberate bugs.

[issue26508] Infinite crash leading to DoS

2016-03-08 Thread Brett Cannon
Brett Cannon added the comment: Victor's point is that this isn't a bug because you are manipulating the C API to make this occur. That means there is no safety guarantee and thus this is not a bug but simply a mis-use of the C API. -- nosy: +brett.cannon resolution: works for me ->

[issue26508] Infinite crash leading to DoS

2016-03-08 Thread pablo sacristan
Changes by pablo sacristan : -- status: closed -> open ___ Python tracker ___ ___

[issue26508] Infinite crash leading to DoS

2016-03-08 Thread pablo sacristan
pablo sacristan added the comment: New content for crash.py: import ctypes, struct, sys, os inner = () outer = (inner,) c_outer = (ctypes.c_char * sys.getsizeof(outer)).from_address(id(outer)) inner_index = c_outer[:].find(struct.pack('P', id(inner)))

[issue26508] Infinite crash leading to DoS

2016-03-08 Thread pablo sacristan
pablo sacristan added the comment: Then it is no bug that it crashes python? You don't have to put it in a loop, but by looping it I am adding the part that makes it take more time but will keep on crashing infinitely, take away the while loop but not what it has inside and then also delete

[issue26508] Infinite crash leading to DoS

2016-03-08 Thread STINNER Victor
STINNER Victor added the comment: > "construct and print a self-referencing tuple" I don't understand the use case here. In pure Python, you cannot build a self-referecing tuple!? Yeah, using the C API or by modifying bytes directly in the memory, you can do that. But if you start to use the

[issue26508] Infinite crash leading to DoS

2016-03-07 Thread pablo sacristan
New submission from pablo sacristan: import ctypes, struct, sys, os while 1: os.system('python /Users/pabstersac/Desktop/Python\ Files/crash.py') #Change to your full path to the file inner = () outer = (inner,) c_outer = (ctypes.c_char *