From de6032c2be1f77f7d4f54b107558be86496cf90d Mon Sep 17 00:00:00 2001 From: Loic Jaquemet Date: Mon, 25 Jan 2016 08:43:00 -0700 Subject: [PATCH] fix pointertypes heuritics --- haystack/allocators/heapwalker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/haystack/allocators/heapwalker.py b/haystack/allocators/heapwalker.py index 818d6f0a..66357907 100644 --- a/haystack/allocators/heapwalker.py +++ b/haystack/allocators/heapwalker.py @@ -80,6 +80,9 @@ def get_heap_walker(self, mapping): raise TypeError('Feed me a IMemoryMapping object') if not self._heap_walkers_dict: self.list_heap_walkers() + # BUG FIXME reverse + if mapping.start not in self._heap_walkers_dict: + raise ValueError('mapping not used as a heap') walker = self._heap_walkers_dict[mapping.start] return walker