malloc error when trying to assign the returned pointer to a struct field
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Fri Sep 8 16:17:15 UTC 2023
On 08/09/2023 7:59 PM, rempas wrote:
> |Fatal glibc error: malloc.c:2594 (sysmalloc): assertion failed:
> (old_top == initial_top (av) && old_size == 0) || ((unsigned long)
> (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long)
> old_end & (pagesize - 1)) == 0)|
I would strongly suggest that you log all memory sizes that are
allocated, and double check that you do free.
Also turn on ASAN in ldc.
http://johanengelen.github.io/ldc/2017/12/25/LDC-and-AddressSanitizer.html
More information about the Digitalmars-d-learn
mailing list