From 632ae3d9e0c629177e76457bb41f51bc3c534fea Mon Sep 17 00:00:00 2001 From: Abdullah <77007406+Kaz-scr@users.noreply.github.com> Date: Wed, 3 Dec 2025 22:23:36 +0530 Subject: [PATCH] tests: relax jemalloc heap address regex for portability (#3460) The previous pattern assumed addresses beginning with 0x7ffff and a limited hex-length, which caused jemalloc heap tests to fail on some systems where extents are mapped at addresses like 0x7ec7... with more digits. Relax the regex to 0x[0-9a-fA-F]{6,16} so we still validate that a hex address is printed, but support different virtual address layouts and jemalloc mappings. --- tests/library/gdb/tests/heap/test_heap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/library/gdb/tests/heap/test_heap.py b/tests/library/gdb/tests/heap/test_heap.py index fe75688fb..492995de5 100644 --- a/tests/library/gdb/tests/heap/test_heap.py +++ b/tests/library/gdb/tests/heap/test_heap.py @@ -512,7 +512,9 @@ def test_heuristic_fail_gracefully(start_binary, is_multi_threaded): ## HEAP_JEMALLOC_EXTENT_INFO = get_binary("heap_jemalloc_extent_info.out") HEAP_JEMALLOC_HEAP = get_binary("heap_jemalloc_heap.out") -re_match_valid_address = r"0x7ffff[0-9a-fA-F]{6,9}" +# Relax address regex to accept different virtual address layouts (ASLR / jemalloc mappings). +# Old pattern assumed addresses starting with 0x7ffff and a limited digit count which fails on some hosts. +re_match_valid_address = r"0x[0-9a-fA-F]{6,16}" def test_jemalloc_find_extent(start_binary):