title: How can I cause Python 3.5 to crash?
body: <p>We are using embedded cpython as a scripting language in our app.  We are modifying our sys.path at startup to make sure that we don't execute code from outside our app, but a user with a sitecustomize.py in their PYTHONPATH is causing code to execute before we have a chance to fix sys.path, and we believe their code has a hard crash (not an exception, which site.py will catch and handle gracefully).</p>
  
  <p>I believe the correct fix is to simply clear the PYTHONPATH variable from the environment before we initialize python, but I can't test it properly because I can't recreate the problem.</p>
  
  <p>The simplest way I've found is using ctypes to write to memory, such as:</p>
  
  <pre><code>import ctypes
  p = (ctypes.c_char).from_address(0)
  while True:
    p[0] = 0
    p = p + 1
  </code></pre>
  
  <p>But in Python 3.5, it doesn't allow me to write to c_char types, giving the error <em>"TypeError: 'c_char' object does not support item assignment"</em>.</p>
  
  <p>I've tried a few of the methods available in <a href="https://wiki.python.org/moin/CrashingPython" rel="noreferrer">https://wiki.python.org/moin/CrashingPython</a> to no avail.</p>
  
  <p>Is there a reliable way to crash python 3.5 from pure Python code?</p>