Re:Make CPython segfault in 5 lines of code
by ehsankia on Thursday December 19, 2019 @01:51AM
(#21832622)
Just one character but replace `[]` with `n` too :)
Re:Make CPython segfault in 5 lines of code
by chrismorgan on Thursday December 19, 2019 @07:13AM
(#21834192)
Or save that character by removing the space before `[]` instead (which you can’t do if you write `n`).
Re:Make CPython segfault in 5 lines of code
by paulddraper on Thursday December 19, 2019 @07:26AM
(#21834268)
Mine produces segfault with
$ python3.7 -VV
Python 3.7.5 (default, Nov 7 2019, 10:50:52)
[GCC 8.3.0]
Some more golfing with yours: (i for i in[]).throw(type('',(IOError,),{'__new__':lambda a,*b:a}))
Someone commented below the gist with this one-liner:
I managed to golf it a bit down to this ;):