Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143925574
D54880.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
989 B
Referenced Files
None
Subscribers
None
D54880.diff
View Options
diff --git a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
--- a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
+++ b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
@@ -168,6 +168,14 @@
{ p6, REG_BASIC },
};
+static void __noinline
+prime_stack(void)
+{
+ char buf[16 * 1024 * 1024];
+
+ explicit_bzero(buf, sizeof(buf));
+}
+
ATF_TC(regcomp_too_big);
ATF_TC_HEAD(regcomp_too_big, tc)
@@ -186,12 +194,15 @@
int e;
struct rlimit limit;
- if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
- atf_tc_skip("https://bugs.freebsd.org/259971");
-
limit.rlim_cur = limit.rlim_max = 256 * 1024 * 1024;
ATF_REQUIRE(setrlimit(RLIMIT_VMEM, &limit) != -1);
+ /*
+ * Pre-fault the stack to avoid crashes caused by growing the stack
+ * beyond the limit.
+ */
+ prime_stack();
+
for (size_t i = 0; i < __arraycount(tests); i++) {
char *d = (*tests[i].pattern)(REGEX_MAXSIZE);
e = regcomp(&re, d, tests[i].type);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 3, 2:00 AM (5 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28046317
Default Alt Text
D54880.diff (989 B)
Attached To
Mode
D54880: netbsd-tests: Fix regcomp_too_big flakiness
Attached
Detach File
Event Timeline
Log In to Comment