microsoft / microsoft/mimalloc
can not use MI_OVERRIDE from alpine with static link file
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.4k
- Forks
- 1.2k
- Avg merge
- 4d 45m
- Merged PRs (30d)
- 13
Description
cmake -DCMAKE_C_FLAGS= -DMI_BUILD_SHARED=OFF -DMI_USE_CXX=OFF -DMI_BUILD_TESTS=OFF -DMI_XMALLOC=ON -DMI_SEE_ASM=ON -DMI_SECURE=ON -DMI_CHECK_FULL=ON -DMI_DEBUG_FULL=ON -DMI_OVERRIDE=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DMI_BUILD_OBJECT=OFF -DMI_LOCAL_DYNAMIC_TLS=OFF -LA
when build static link file, get error with MI_OVERRIDE.
0x0000000000308fe6 in mi_checked_ptr_segment (p=0x7ffff7ef2000, msg=0x230e7d "mi_free") at mimalloc/src/alloc.c:471
471 if (mi_likely(_mi_ptr_cookie(segment) == segment->cookie)) {
(gdb) bt
#0 0x0000000000308fe6 in mi_checked_ptr_segment (p=0x7ffff7ef2000, msg=0x230e7d "mi_free") at mimalloc/src/alloc.c:471
#1 0x000000000030799c in mi_free (p=0x7ffff7ef2000) at mimalloc/src/alloc.c:488
Is mimalloc support static link ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported static build with the provided CMake options, then inspect mimalloc/src/alloc.c at mi_checked_ptr_segment and mi_free. Use the shown debugger backtrace to investigate the MI_OVERRIDE failure. Done means a static link build with MI_OVERRIDE no longer reaches this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100