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
We do this so we can figure out if we've allocated memory through the comm layer, or through the normal memory interface. Passing in the wrong size to the free routine can result in mixed allocation calls, which is UB and can cause bugs like: #13611
We should add the ability to check if the free size matches the allocation size. Note that this requires storing the sizes of allocations, so we don't want to do this by default, but that's something we already track for --memTrack so we can probably add that as a sanity check there pretty easily.
The text was updated successfully, but these errors were encountered:
Spawned off from #13611 (comment)
Our array allocation sub-interface requires the allocation size when free'ing:
chapel/runtime/include/chpl-mem-array.h
Lines 102 to 104 in a1cc8ea
We do this so we can figure out if we've allocated memory through the comm layer, or through the normal memory interface. Passing in the wrong size to the free routine can result in mixed allocation calls, which is UB and can cause bugs like: #13611
We should add the ability to check if the free size matches the allocation size. Note that this requires storing the sizes of allocations, so we don't want to do this by default, but that's something we already track for
--memTrack
so we can probably add that as a sanity check there pretty easily.The text was updated successfully, but these errors were encountered: