1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-29 16:30:19 +02:00

fix mprotect for i386

2006-05-18  Matthew Flatt  <mflatt@cs.utah.edu>

	* lightning/i386/asm.h: Fix test for extending the mprotect area
	towards lower addresses.

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-21
This commit is contained in:
Paolo Bonzini 2006-05-18 08:15:08 +00:00
parent 2c42ac60f9
commit 0c068368cc
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2006-05-18 Matthew Flatt <mflatt@cs.utah.edu>
* lightning/i386/asm.h: Fix test for extending the mprotect area
towards lower addresses.
2006-05-16 Bruno Haible <bruno@clisp.org> 2006-05-16 Bruno Haible <bruno@clisp.org>
* lightning/asm-common.h: Don't use __func__ nor __FUNCTION__ if * lightning/asm-common.h: Don't use __func__ nor __FUNCTION__ if

View file

@ -74,12 +74,13 @@ jit_flush_code(void *dest, void *end)
/* See if we can extend the previously mprotect'ed memory area towards /* See if we can extend the previously mprotect'ed memory area towards
higher addresses: the starting address remains the same as before. */ higher addresses: the starting address remains the same as before. */
if (page >= prev_page && page <= prev_page + prev_length) else if (page >= prev_page && page <= prev_page + prev_length)
prev_length = page + length - prev_page; prev_length = page + length - prev_page;
/* See if we can extend the previously mprotect'ed memory area towards /* See if we can extend the previously mprotect'ed memory area towards
lower addresses: the highest address remains the same as before. */ lower addresses: the highest address remains the same as before. */
else if (page < prev_page && page + length <= prev_page + prev_length) else if (page < prev_page && page + length >= prev_page
&& page + length <= prev_page + prev_length)
prev_length += prev_page - page, prev_page = page; prev_length += prev_page - page, prev_page = page;
/* Nothing to do, replace the area. */ /* Nothing to do, replace the area. */