mmap(2) says that you must call mmap() with either MAP_SHARED or
MAP_PRIVATE. We didn't catch this because we checked for a NULL return, not a -1 return. Doh! Thanks again to Julian Seward for continuing to track this down. This commit was SVN r22062.
Этот коммит содержится в:
родитель
977574bd45
Коммит
d7db5f4c32
@ -133,8 +133,8 @@ static int ptmalloc2_open(void)
|
||||
val |= OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_CHUNK_SUPPORT;
|
||||
}
|
||||
|
||||
p = mmap(NULL, 4096, PROT_READ, MAP_ANONYMOUS, -1, 0);
|
||||
if (NULL == p) {
|
||||
p = mmap(NULL, 4096, PROT_READ, (MAP_ANONYMOUS | MAP_PRIVATE), -1, 0);
|
||||
if (((void*) -1) == p) {
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
munmap(p, 4096);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user