Avoid leaking handles across processes

This commit is contained in:
Justine Tunney 2023-09-12 01:07:51 -07:00
parent a359de7893
commit 8a0008d985
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
44 changed files with 232 additions and 266 deletions

View file

@ -32,15 +32,15 @@
static uint64_t sys_mmap_metal_break;
dontasan static struct DirectMap bad_mmap(void) {
static struct DirectMap bad_mmap(void) {
struct DirectMap res;
res.addr = (void *)-1;
res.maphandle = -1;
return res;
}
dontasan struct DirectMap sys_mmap_metal(void *vaddr, size_t size, int prot,
int flags, int fd, int64_t off) {
struct DirectMap sys_mmap_metal(void *vaddr, size_t size, int prot, int flags,
int fd, int64_t off) {
/* asan runtime depends on this function */
size_t i;
struct mman *mm;