]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Ignore large memory blocks when searching for keys
authorBenjamin Berg <benjamin.berg@intel.com>
Fri, 14 Jun 2024 08:13:51 +0000 (10:13 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 11 Jul 2024 16:55:48 +0000 (19:55 +0300)
wpa_supplicant will generally never allocate a memory block of that
size. We can therefore assume that it belongs to ASAN and we need to
ignore it.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
tests/hwsim/test_ap_psk.py

index 085619f0d32bd361013deab7ea88c98a9b43ae51..96550930dcf9ba2d75620d04b9c9f087b65eed2b 100644 (file)
@@ -2658,6 +2658,11 @@ def read_process_memory(pid, key=None):
             for name in ["[heap]", "[stack]"]:
                 if name in l:
                     logger.info("%s 0x%x-0x%x is at %d-%d" % (name, start, end, len(buf), len(buf) + (end - start)))
+
+            if end - start >= 256 * 1024 * 1024:
+                logger.info("Large memory block of >= 256MiB, assuming ASAN shadow memory")
+                continue
+
             try:
                 mem.seek(start)
                 data = mem.read(end - start)