guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 19/437: fix mprotect for i386


From: Andy Wingo
Subject: [Guile-commits] 19/437: fix mprotect for i386
Date: Mon, 2 Jul 2018 05:13:36 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit 0c068368ccc1fb46bfa33c06ac81b916eaa21a36
Author: Paolo Bonzini <address@hidden>
Date:   Thu May 18 08:15:08 2006 +0000

    fix mprotect for i386
    
    2006-05-18  Matthew Flatt  <address@hidden>
    
        * lightning/i386/asm.h: Fix test for extending the mprotect area
        towards lower addresses.
    
    git-archimport-id: address@hidden/lightning--stable--1.2--patch-21
---
 ChangeLog              | 5 +++++
 lightning/i386/funcs.h | 5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1930fbd..c7312df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-18  Matthew Flatt  <address@hidden>
+
+       * lightning/i386/asm.h: Fix test for extending the mprotect area
+       towards lower addresses.
+
 2006-05-16  Bruno Haible  <address@hidden>
 
        * lightning/asm-common.h: Don't use __func__ nor __FUNCTION__ if
diff --git a/lightning/i386/funcs.h b/lightning/i386/funcs.h
index d57e14e..ee26d46 100644
--- a/lightning/i386/funcs.h
+++ b/lightning/i386/funcs.h
@@ -74,12 +74,13 @@ jit_flush_code(void *dest, void *end)
 
   /* See if we can extend the previously mprotect'ed memory area towards
      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;
 
   /* See if we can extend the previously mprotect'ed memory area towards
      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;
 
   /* Nothing to do, replace the area.  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]