> On 2 Dec 2022, at 04:42, DJ Delorie via Libc-alpha wrote: > > [snip] >> The larger consequence of this patch though is that we further support >> the usage of malloc_usable_size for cases beyond diagnostics. Do we >> want to do that? > > To what extend do we support it *at all*, other than "it returns the > right number at the time it was called" ? Right. It's still not clear to me if glibc is actually interested in supporting the use case here. If it isn't, it should be stated clearly so it's clear who is to blame when FORTIFY_SOURCE=3 complains. (And it's also unclear to me that it should be supported, either.) > >> If we do, should we also then make clear what kind of usage we support >> as a library, say, in the manual? > > Our man page already says "The main use of this function is for > debugging and introspection". The BSD manual says "The > malloc_usable_size() function is not a mechanism for in-place realloc(); > rather it is provided solely as a tool for introspection purposes." > My guess is the systemd maintainers currently rely on a specific interpretation of "introspection" which may not align with glibc's.