Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fixed crash on Android x86_64, API levels 27-28, caused by mimalloc calling
system calls directly.
5 changes: 4 additions & 1 deletion Objects/mimalloc/prim/unix/prim.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ terms of the MIT license. A copy of the license can be found in the file
// Use syscalls for some primitives to allow for libraries that override open/read/close etc.
// and do allocation themselves; using syscalls prevents recursion when mimalloc is
// still initializing (issue #713)
//
// This isn't done on Android because some versions have an excessively strict
// seccomp filter (https://github.com/android/ndk/issues/1298).
//------------------------------------------------------------------------------------

#if defined(MI_HAS_SYSCALL_H) && defined(SYS_open) && defined(SYS_close) && defined(SYS_read) && defined(SYS_access)
#if defined(MI_HAS_SYSCALL_H) && defined(SYS_open) && defined(SYS_close) && defined(SYS_read) && defined(SYS_access) && !defined(__ANDROID__)

static int mi_prim_open(const char* fpath, int open_flags) {
return syscall(SYS_open,fpath,open_flags,0);
Expand Down
Loading