[pypy-svn] r15722 - pypy/dist/pypy/rpython/memory

cfbolz at codespeak.net cfbolz at codespeak.net
Sat Aug 6 13:53:09 CEST 2005


Author: cfbolz
Date: Sat Aug  6 13:53:07 2005
New Revision: 15722

Modified:
   pypy/dist/pypy/rpython/memory/simulator.py
Log:
prevent find_block from looping forever.


Modified: pypy/dist/pypy/rpython/memory/simulator.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/simulator.py	(original)
+++ pypy/dist/pypy/rpython/memory/simulator.py	Sat Aug  6 13:53:07 2005
@@ -67,6 +67,8 @@
             self.size_of_simulated_ram = ram_size
 
     def find_block(self, address):
+        if address >= self.freememoryaddress:
+            raise MemorySimulatorError, "trying to access memory not malloc'ed"
         lo = 0
         hi = len(self.blocks)
         while lo < hi:



More information about the Pypy-commit mailing list