microsoft / microsoft/mimalloc

Assertion failed on Apple arm64

Open
#354 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
13.4k
Forks
1.2k
Avg merge
4d 45m
Merged PRs (30d)
13

Description

Hey!

I am getting this error when using mimalloc's dev branch on Apple arm64 (M1) when compiling in Debug mode:

```
mimalloc: assertion failed: at "./extlib/mimalloc/src/heap.c":188, mi_heap_get_backing
assertion: "bheap->thread_id == _mi_thread_id()"
```

Coming from here: https://github.com/microsoft/mimalloc/blob/master/src/heap.c#L188

When building in Release mode, the application seems runs fine though.

I will try to do a bisect to see where this got introduced, but am hoping that I can get some background information on why this assertion is there / what exactly it is checking and what potential problems this can cause.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at extlib/mimalloc/src/heap.c:188 and inspect mi_heap_get_backing and the reported thread_id assertion. Reproduce the failure on Apple arm64 in Debug and compare with Release, then use the reporter's planned bisect to identify the introducing change. Done means establishing the cause and potential impact; the issue does not name a test or patch target.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.