NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/55829: memmem_oob test case sometimes fails
The following reply was made to PR lib/55829; it has been noted by GNATS.
From: Andreas Gustafsson <gson%gson.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: Christos Zoulas <christos%zoulas.com@localhost>
Subject: Re: lib/55829: memmem_oob test case sometimes fails
Date: Fri, 27 Nov 2020 17:42:48 +0200
I think what's happening is that when the test calls
char *guard = mmap(src + pg, pg,
PROT_NONE, MAP_ANON|MAP_PRIVATE|MAP_FIXED, -1, (off_t)0);
the address src + pg is already in use by the dynamic linker.
I'm running a test to see if this patch will fix it:
--- t_memmem.c 27 Nov 2020 15:37:06 -0000 1.5
+++ t_memmem.c 27 Nov 2020 15:38:00 -0000
@@ -105,7 +105,7 @@
{
static const char str[] = "abcde";
size_t pg = getpagesize();
- char *src = mmap(NULL, pg, PROT_READ|PROT_WRITE,
+ char *src = mmap(NULL, pg * 2, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, -1, (off_t)0);
ATF_CHECK(src != MAP_FAILED);
char *guard = mmap(src + pg, pg,
--
Andreas Gustafsson, gson%gson.org@localhost
Home |
Main Index |
Thread Index |
Old Index