Commit 0135188f authored by shlevy's avatar shlevy Committed by Ben Gamari

Storage.c: Pass a size to sys_icache_invalidate

The previous code passed an end pointer, but the interface takes a size

Fixes #12838.

Reviewers: austin, erikd, simonmar, bgamari

Reviewed By: simonmar, bgamari

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #12838
parent a637eeb7
......@@ -1314,7 +1314,7 @@ calcNeeded (rtsBool force_major, memcount *blocks_needed)
------------------------------------------------------------------------- */
#if (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && defined(ios_HOST_OS)
void sys_icache_invalidate(void *start, size_t len);
#include <libkern/OSCacheControl.h>
/* On ARM and other platforms, we need to flush the cache after
......@@ -1327,7 +1327,7 @@ void flushExec (W_ len, AdjustorExecutable exec_addr)
#elif (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && defined(ios_HOST_OS)
/* On iOS we need to use the special 'sys_icache_invalidate' call. */
sys_icache_invalidate(exec_addr, ((unsigned char*)exec_addr)+len);
sys_icache_invalidate(exec_addr, len);
#elif defined(__GNUC__)
/* For all other platforms, fall back to a libgcc builtin. */
unsigned char* begin = (unsigned char*)exec_addr;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment