[pypy-commit] pypy asmmemmgr-for-code-only: Fix assertions in rmmap.set_pages_*
vext01
pypy.commits at gmail.com
Sun Aug 28 15:47:55 EDT 2016
Author: Edd Barrett <vext01 at gmail.com>
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:
More information about the pypy-commit
mailing list