Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
614 B · 28 lines
Nix
1234567891011121314151617181920212223242526272829{ interpreter, gdb, writeText, runCommand,}:
let crashme-py = writeText "crashme.py" '' import ctypes
def sentinel_foo_bar(): ctypes.memset(0, 1, 1)
sentinel_foo_bar() '';inrunCommand "python-gdb" { } '' # test that gdb is able to recover the python stack frame of this segfault ${gdb}/bin/gdb -batch -ex 'set debug-file-directory ${interpreter.debug}/lib/debug' \ -ex 'source ${interpreter}/share/gdb/libpython.py' \ -ex r \ -ex py-bt \ --args ${interpreter}/bin/python ${crashme-py} | grep 'in sentinel_foo_bar' > /dev/null
# success. touch $out''