1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-11 07:22:22 +00:00

- Avoid using mmap MAP_ANON with a non-zero offset. [1]

- Bump PORTREVISION.

PR:		kern/71258 [1]
This commit is contained in:
Juergen Lock 2010-05-30 19:22:32 +00:00
parent fc7219e3d5
commit d192ad85aa
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=255345
2 changed files with 9 additions and 2 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= qemu
PORTVERSION= 0.11.1
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SAVANNAH} \
http://bellard.org/qemu/

View File

@ -1,5 +1,5 @@
Index: qemu/osdep.c
@@ -179,7 +179,9 @@
@@ -179,13 +179,15 @@ static void *kqemu_vmalloc(size_t size)
}
unlink(phys_ram_file);
}
@ -9,3 +9,10 @@ Index: qemu/osdep.c
ftruncate(phys_ram_fd, phys_ram_size + size);
#endif /* !(__OpenBSD__ || __FreeBSD__ || __DragonFly__) */
ptr = mmap(NULL,
size,
PROT_WRITE | PROT_READ, map_anon | MAP_SHARED,
- phys_ram_fd, phys_ram_size);
+ phys_ram_fd, map_anon ? 0 : phys_ram_size);
if (ptr == MAP_FAILED) {
fprintf(stderr, "Could not map physical memory\n");
exit(1);