Post AVvuXV5du2o35qf9iS by colatkinson@mastodon.social
 (DIR) More posts by colatkinson@mastodon.social
 (DIR) Post #AVvZb8GcbNUWQjglGa by a@social.exozy.me
       2023-05-22T22:55:15Z
       
       0 likes, 0 repeats
       
       how to make Python segfault in only 43 bytes of code:from ctypes import *;pointer(c_int())[9**9]does anyone know how to it in fewer lines?
       
 (DIR) Post #AVvbBAZZbg5lxbIie0 by colin@fed.uninsane.org
       2023-05-22T23:08:44.204428Z
       
       0 likes, 0 repeats
       
       @a from signal import*;raise_signal(11)
       
 (DIR) Post #AVvbBBNuaWMGTiqv6e by a@social.exozy.me
       2023-05-22T23:12:58Z
       
       0 likes, 0 repeats
       
       @colin Nice! That's not *really* a segfault but I'll count it.and thanks for the "import*" instead of "import *" trick, which I used to shave off one character from my original code.
       
 (DIR) Post #AVvbBBYXwyrh0hpPgO by colin@fed.uninsane.org
       2023-05-22T23:11:51.369305Z
       
       0 likes, 0 repeats
       
       @a why does your server display my name as the bread meme
       
 (DIR) Post #AVvbGpSd0u5wDhkd3A by a@social.exozy.me
       2023-05-22T23:14:02Z
       
       0 likes, 0 repeats
       
       @colin ¯\_ (ツ)_/¯ActivityPub has no consistency guarantees which means arbitrarily weird stuff can happen
       
 (DIR) Post #AVvuXV5du2o35qf9iS by colatkinson@mastodon.social
       2023-05-23T02:49:52Z
       
       0 likes, 0 repeats
       
       @a This was my go-to when testing fault handling at work:from ctypes import*;c_char_p(1).value37 bytes if I didn't screw up the wc
       
 (DIR) Post #AVwFDIkCC2WS35qBlY by Gusted@social.linux.pizza
       2023-05-23T06:41:31Z
       
       0 likes, 0 repeats
       
       @a 33 bytes:import ctypes;ctypes.string_at(0)Could probably be less bytes, if there's another function that allows to pass the raw address.