On Fri Jan 27 19:24:25 2023 +0000, Zebediah Figura wrote:
`memdup` returns initialized data which could contain pointers, I
don't think `__WINE_MALLOC` should be used. Note that extends to __WINE_DEALLOC, which is also underlyingly __attribute__((malloc)).
It's gross, but I'm pretty sure the plain form of `attribute((malloc))` is independent from the deallocator forms.
For example, [in the GCC docs' example](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html) both plain `malloc` and `malloc(deallocator)` are specified.
Also, `glibc` [only specifies a deallocator](https://github.com/bminor/glibc/blob/ae612c45efb5e34713859a5facf92368307efb6...) for `reallocarray`.
(Aside from this kind of ambiguity, overloading `attribute((malloc))` also prevents using `has_attribute` to detect whether the deallocator form is supported. A bizarre decision.)