microsoft / mimalloc

mimalloc is a compact general purpose allocator with excellent performance.
MIT License
9.74k stars 793 forks source link

getting an assertion error in Koka #814

Open TimWhiting opened 10 months ago

TimWhiting commented 10 months ago
mimalloc: assertion failed: at "/Users/timwhiting/koka/kklib/src/../mimalloc/src/alloc.c":109, mi_heap_malloc_small_zero
  assertion: "heap->thread_id == 0 || heap->thread_id == tid"

The stack isn't overflowing, and I'm not using multiple threads. Originally found on MacOS, but is also reproducing on Linux. Koka is using the latest dev-slice branch I think. Update, I think the heap that Koka is sending in might have gotten mixed up due to invalid calling of a closure with the wrong number of arguments --> _ctx is in the wrong position.