You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way spin spawns the actual spawns the test process, lldb doesn't wrap it. Not sure if there is a clear solution though (maybe I need to tell lldb to wrap the child process or just launch the tests more explicitly).
Basically, add a test like:
def test_crash():
import numpy as np
from numpy.lib.stride_tricks import as_strided
a = as_strided(np.arange(10), (10_000_000,), (8,))
a[...] = 3
which segfaults. If you just run it with spin lldb -- python -mspin test -t ... you should find that it's not running inside lldb and doesn't stop for debugging. (Even disabling the fault handler with PYTEST_ADDOPTS="-p no:faulthandler").
Maybe there is a very simple work-around. I think last time I around I made a minimal example and used spin lldb -c "exec(open('test.py').read())" (to both run in the right process and to be sure to find the right numpy install).
I think this used to work, but I suspect that
python -mspin test
now runs in a new process so that the debugger/lldb doesn't attach to you.I am not sure that this can be changed easily, FWIW,
python lldb -c ...
, etc. all work fine (I just like to run a test that fails if it does).EDIT: This is not new in 0.13, if it changed (I think it did), it changed a while ago.
The text was updated successfully, but these errors were encountered: