On Thu Mar 21 05:16:45 2024 +0000, Jinoh Kang wrote:
We're releasing the object unscrubbed. A future `alloc_shared_object()` call will return uninitialized memory, with leftover contents from previous allocation.[^1]
memset( (char *)shared + offsetof(session_obj_t, obj.id), 0, sizeof(*shared) - offsetof(session_obj_t, obj.id) );
(Although a cleaner approach would be appreciated if possible) [^1]: This means that e.g., queues will reuse memory from inputs (once we introduce other kinds of shared objects).
I think in wineserver memory is left uncleared and uninitialized, on purpose, and up to the allocer to initialize? I will add `mark_block_uninitialized( ptr, size );` on the allocation side instead.