From: Thomas Preud'homme Date: Tue, 19 Mar 2013 13:03:15 +0000 (+0100) Subject: Fix synchronization between data and instr caches X-Git-Tag: release_0_9_27~1100 X-Git-Url: https://repo.or.cz/w/tinycc.git/commitdiff_plain/c68af2db9d497fd8229162bc23b9679fc2e1fc8b Fix synchronization between data and instr caches --- diff --git a/tccrun.c b/tccrun.c index 174b6c21..d858ae61 100644 --- a/tccrun.c +++ b/tccrun.c @@ -225,7 +225,7 @@ static void set_pages_executable(void *ptr, unsigned long length) end = (addr_t)ptr + length; end = (end + PAGESIZE - 1) & ~(PAGESIZE - 1); mprotect((void *)start, end - start, PROT_READ | PROT_WRITE | PROT_EXEC); - __clear_cache(ptr, prog_main + length); + __clear_cache(ptr, ptr + length); #endif }