[Bug 259971] lib.libc.regex.exhaust_test.regcomp_too_big fails with ASLR on by default
Date: Tue, 27 Jan 2026 21:14:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259971
--- Comment #11 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:
URL:
https://cgit.FreeBSD.org/src/commit/?id=938915a22c84af88afa587694e8d63ce9dd202f4
commit 938915a22c84af88afa587694e8d63ce9dd202f4
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-01-27 21:08:35 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-01-27 21:08:35 +0000
netbsd-tests: Fix regcomp_too_big flakiness
The test sometimes crashes with ASLR enabled. This seems to happen when
regcomp() grows the process stack and happens to run into the virtual
memory limit set at the beginning of the test. ASLR triggers the
problem since it introduces a bit of fragmentation and thus introduces
cases where stack allocation can be the trigger of virtual memory
exhaustion, rather than dynamic memory allocation in regcomp().
Make the test stable by priming the stack before doing anything else.
This effectively reserves 16MB of virtual memory for the stack, which in
practice is enough to make the test stable on amd64.
PR: 259971
Reviewed by: ngie, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54880
contrib/netbsd-tests/lib/libc/regex/t_exhaust.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
--
You are receiving this mail because:
You are the assignee for the bug.