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
Currently the only function that handles sentinel terminated slices
properly is free. All other uses of mem.sliceAsBytes() in the allocator
interface lack proper handling of a possible sentinel.
This commit changes the Allocator interface to use @ptrCast() plus
the new mem.absorbSentinel() instead.
This also makes incorrectly passing a pointer to array to
Allocator.free() a compile error. The proper function to free a pointer
to an array is Allocator.destroy().
Reported-by: David Vanderson <[email protected]>
References: #19984
References: #22706
References: #23020
0 commit comments