-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't launch my app when use the dynamical lib of mimalloc in IOS #437
Comments
The mimalloc version v1.7.3 and v2.0.3 have much improved support for macOS -- perhaps this also fixes the problem on iOS? |
@daanx i just tried v2.0.3 on iOS15 if MI_OSX_ZONE + MI_OSX_INTERPOSE are turned on, the zones crash upon application boot: but if you turn off MI_OSX_ZONE and leave MI_OSX_INTERPOSE on, the application boots properly and it seems to finally work now! Edit: this is via linking the object file |
Ah it is great to hear that it starts working on iOS :-). I see I defined it as: static size_t zone_size(malloc_zone_t* zone, const void* p) {
MI_UNUSED(zone);
//if (!mi_is_in_heap_region(p)){ return 0; } // not our pointer, bail out
return mi_usable_size(p);
} Can you comment out the line that checks if it is a valid pointer and see if it starts working? I was perhaps a bit too positive there :-) |
if i uncomment out that line, then the program doesn't finish booting... failing in zone_size still via realloc. and with MI_OSX_ZONE=OFF, i'm now getting one weird EXC_BAD_ACCESS when calling some iOS library function, via...
|
@daanx |
turning on debug mode instead of EXEC_BAD_ACCESS it halts on an assertion
|
I am hitting the same issue. |
Log is:
ul 7 15:32:32 iPhone ReportCrash[17738] : Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_PROTECTION_FAILURE at 0x000000016fcd7fb0
Triggered by Thread: 0
Jul 7 15:32:32 iPhone ReportCrash[17738] : Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 dyld 0x00000001200bf1bc 0x1200a8000 + 94652
1 dyld 0x00000001200bf480 0x1200a8000 + 95360
2 dyld 0x00000001200c0750 0x1200a8000 + 100176
3 dyld 0x00000001200abf64 0x1200a8000 + 16228
4 libdyld.dylib 0x00000001809f4ba0 0x1809f4000 + 2976
5 libmimalloc.1.7.dylib 0x00000001019ce030 0x1019b8000 + 90160
6 libmimalloc.1.7.dylib 0x00000001019cc15c 0x1019b8000 + 82268
7 libmimalloc.1.7.dylib 0x00000001019c89a8 0x1019b8000 + 68008
8 libmimalloc.1.7.dylib 0x00000001019c92dc 0x1019b8000 + 70364
9 libmimalloc.1.7.dylib 0x00000001019c8678 0x1019b8000 + 67192
10 libsystem_malloc.dylib 0x0000000180b3d458 0x180b3c000 + 5208
11 libsystem_malloc.dylib 0x0000000180b419dc 0x180b3c000 + 23004
12 dyld 0x00000001200c7860 0x1200a8000 + 129120
The text was updated successfully, but these errors were encountered: