Author: Edd Barrett <[email protected]>
Branch: asmmemmgr-for-code-only
Changeset: r86652:2a5b8eb3457c
Date: 2016-08-28 20:33 +0100
http://bitbucket.org/pypy/pypy/changeset/2a5b8eb3457c/

Log:    Fix assertions in rmmap.set_pages_*

diff --git a/rpython/rlib/rmmap.py b/rpython/rlib/rmmap.py
--- a/rpython/rlib/rmmap.py
+++ b/rpython/rlib/rmmap.py
@@ -727,7 +727,7 @@
         return c_mprotect_safe(addr, size, prot)
 
     def set_pages_executable(addr, size):
-        assert isinstance(addr, lltype._ptr)
+        assert lltype.typeOf(addr) == rffi.CCHARP
         assert isinstance(size, int)
         rv = mprotect(addr, size, PROT_EXEC | PROT_READ)
         if int(rv) < 0:
@@ -735,7 +735,7 @@
             debug.fatalerror_notb("set_pages_executable failed")
 
     def set_pages_writable(addr, size):
-        assert isinstance(addr, lltype._ptr)
+        assert lltype.typeOf(addr) == rffi.CCHARP
         assert isinstance(size, int)
         rv = mprotect(addr, size, PROT_WRITE | PROT_READ)
         if int(rv) < 0:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to