gcov: call mmap MAP_ANONYMOUS with fd equal to -1

libgcc/ChangeLog:

	PR gcov-profile/99385
	* libgcov.h (allocate_gcov_kvp): Call mmap with fd equal to -1.
This commit is contained in:
Martin Liska 2021-03-04 11:45:47 +01:00
parent f232f782e6
commit 4c955b4ad3

View File

@ -426,7 +426,7 @@ allocate_gcov_kvp (void)
{
void *ptr = mmap (NULL, MMAP_CHUNK_SIZE,
PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (ptr != MAP_FAILED)
{
__gcov_kvp_dynamic_pool = ptr;