Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
29 lines
614 B
Nix
29 lines
614 B
Nix
{
|
|
interpreter,
|
|
gdb,
|
|
writeText,
|
|
runCommand,
|
|
}:
|
|
|
|
let
|
|
crashme-py = writeText "crashme.py" ''
|
|
import ctypes
|
|
|
|
def sentinel_foo_bar():
|
|
ctypes.memset(0, 1, 1)
|
|
|
|
sentinel_foo_bar()
|
|
'';
|
|
in
|
|
runCommand "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
|
|
''
|