Skip to content
Snippets Groups Projects
Unverified Commit dff0a86f authored by Thorsten Hater's avatar Thorsten Hater Committed by GitHub
Browse files

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.
parent bae9e9a3
No related branches found
No related tags found
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment