I'm not quite sure how to proceed for #56985. On the one hand, we want function pointers (which have no backing allocation) to be treated as a zst allocation (so offsetting is only ok by zero) on the other hand we want to detect pointers to dead allocations
I can do the full checking for that, but it seems that this would duplicate a lot of code from the
get could return an
None representing a ZST without backing allocation?
hm no that'll also not be good
@Oli what about extending
get_size_and_align to also take a flag whether the allocation must be live?
yea that seems the most reasonable course of action
I mean it essentially resolves to the "full manual checking" but with some deduplication
yeah, it should actually not introduce new duplicates, just better use the existing ones ;)