Closed angus-g closed 3 years ago
Oh except there are now new (I believe?) particle test failures...
Ah yes, I was going to ask whether those were existing or not...I might have to dig a bit deeper into what's going on!
All green on the PR now, thanks @angus-g :-)
@stephankramer - might you be able to review again please and merge if you're happy?
(Duplicated from #319)
When we allocate/unpack detectors from Zoltan, some code expects that their attribute arrays (used for particles) are at least allocated, even if length 0. Ensuring this is done avoids potential segfaults when these arrays are unconditionally accessed.
Thanks @stephankramer for the detailed analysis of this issue! I think this is probably the right place for this allocation? Of course, the other approach would be to figure out where attribute_size is being passed into unpack_detector as a non-optional on a detector. (As an aside, that subroutine looks like it could just take a non-optional attribute_size and then the logic wouldn't be exactly duplicated in both branches...)
Closes #317.