Segfault on instantiating mechanisms on empty regions (#1657)
More, subtler fallout of the ABI patchset: When mechanisms are added to empty regions, various, layered segfaults appear. 1. `set_parameter` will receive a `nullptr` upon linear search, throwing `no such parameter` 2. Guarding this for finite `width` uncovers further need in the ABI interface methods 3. This is caused by early exit in `instantiate` on `width == 0` 4. Getting rid of this is better, as we can treat vacuous mechanism painting like all others... 5. ...but causes another segfault, since we default index arrays to `cv_pos.back()` but `cv_pos` is empty. This patch fixes all of the above and in addition removes mechanisms without support before reifying them on the FVM cells. Relevant tests are added.
Showing
- arbor/backends/multicore/shared_state.cpp 9 additions, 6 deletionsarbor/backends/multicore/shared_state.cpp
- arbor/fvm_layout.cpp 5 additions, 5 deletionsarbor/fvm_layout.cpp
- test/unit/test_abi.cpp 98 additions, 2 deletionstest/unit/test_abi.cpp
- test/unit/test_fvm_lowered.cpp 27 additions, 0 deletionstest/unit/test_fvm_lowered.cpp
Please register or sign in to comment