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,7 +32,7 @@
#define G FRAMESIZE
static dontasan void *_mapframe(void *p, int f) {
static void *_mapframe(void *p, int f) {
int rc, prot, flags;
struct DirectMap dm;
prot = PROT_READ | PROT_WRITE;
@ -73,7 +73,7 @@ static dontasan void *_mapframe(void *p, int f) {
* @return new value for `e` or null w/ errno
* @raise ENOMEM if we require more vespene gas
*/
dontasan void *_extend(void *p, size_t n, void *e, int f, intptr_t h) {
void *_extend(void *p, size_t n, void *e, int f, intptr_t h) {
char *q;
unassert(!((uintptr_t)SHADOW(p) & (G - 1)));
unassert((uintptr_t)p + (G << kAsanScale) <= h);