Low memory map of a Wine process:
Code: Select all
00010000-00120000 rw-p 00000000 00:00 0
00120000-00220000 ---p 00000000 00:00 0
00220000-00223000 rw-p 00000000 00:00 0
00223000-00224000 ---p 00000000 00:00 0
00224000-00230000 ---p 00000000 00:00 0
00230000-00232000 ---p 00000000 00:00 0
00232000-00330000 rw-p 00000000 00:00 0
00330000-20000000 ---p 00000000 00:00 0
Code: Select all
wine: Unhandled page fault on read access to 0x00110acc at address 0x7ef7e5f9 (thread 0025), starting debugger...
err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x7ef76890
Code: Select all
/* winegcc -m32 -Wall -Wextra -g -O0 loader.c -o loader */
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <wine/library.h>
int
main(int argc, char **argv) {
(void)argc, (void)argv;
int fd;
fd = open("/dev/zero", O_RDONLY);
wine_mmap_remove_reserved_area(NULL, 0x232000, 1);
mmap((void *)0x10000, 0x232000 - 0x10000, PROT_NONE, MAP_PRIVATE | MAP_FIXED | MAP_NORESERVE, fd, 0);
wine_mmap_add_reserved_area(NULL, 0x232000);
return 0;
}