12 May
2023
12 May
'23
9:10 a.m.
Rémi Bernon (@rbernon) commented about dlls/ntdll/heap.c:
entry->lpData = (char *)block + block_get_overhead( block ); entry->cbData = block_get_size( block ) - block_get_overhead( block ); /* FIXME: last free block should not include uncommitted range, which also has its own overhead */ - if (!contains( blocks, commit_end - (char *)blocks, block, block_get_size( block ) )) + if (!contains( blocks, commit_end - (char *)blocks - 4 * BLOCK_ALIGN, block, block_get_size( block ) ))
Why is this needed? I think it could perhaps safely be HEAP_MIN_BLOCK_SIZE, but this 4*BLOCK_ALIGN looks very arbitrary. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2800#note_32650