Skip to content

Commit

Permalink
micropython: fix non-symmetric patch
Browse files Browse the repository at this point in the history
Commenting-out ALLOC_EXEC and keeping FREE_EXEC might result in invalid
memory release procedure (`unmap` instead of `free`).

JIRA: CI-334
  • Loading branch information
nalajcie committed Sep 15, 2023
1 parent 7018635 commit 863bfce
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ diff -Naur micropython-1.15/ports/unix/mpconfigport.h micropython-phoenix/ports/
void mp_unix_free_exec(void *ptr, size_t size);
void mp_unix_mark_exec(void);
-#define MP_PLAT_ALLOC_EXEC(min_size, ptr, size) mp_unix_alloc_exec(min_size, ptr, size)
-#define MP_PLAT_FREE_EXEC(ptr, size) mp_unix_free_exec(ptr, size)
+// #define MP_PLAT_ALLOC_EXEC(min_size, ptr, size) mp_unix_alloc_exec(min_size, ptr, size)
#define MP_PLAT_FREE_EXEC(ptr, size) mp_unix_free_exec(ptr, size)
+// #define MP_PLAT_FREE_EXEC(ptr, size) mp_unix_free_exec(ptr, size)
#ifndef MICROPY_FORCE_PLAT_ALLOC_EXEC
// Use MP_PLAT_ALLOC_EXEC for any executable memory allocation, including for FFI
// (overriding libffi own implementation)
Expand Down

0 comments on commit 863bfce

Please sign in to comment.