Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion pkg/noun/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -1815,6 +1815,16 @@ u3m_soft_esc(u3_noun ref, u3_noun sam)
return pro;
}

void
u3m_mark_mute(void)
{
u3m_quac** arr_u = u3m_mark();
for (c3_w i_w = 0; arr_u[i_w]; i_w++) {
u3a_quac_free(arr_u[i_w]);
}
c3_free(arr_u);
}

/* u3m_grab(): garbage-collect the world, plus extra roots.
*/
void
Expand All @@ -1839,7 +1849,7 @@ u3m_grab(u3_noun som, ...) // terminate with u3_none
}
va_end(vap);
}
u3m_mark(); // XX leaks
u3m_mark_mute();
u3a_sweep();
}

Expand Down
1 change: 1 addition & 0 deletions pkg/vere/io/lick.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ _lick_io_exit(u3_auto* car_u)
}

u3s_cue_xeno_done(lic_u->sil_u);
c3_free(lic_u->fod_c);
c3_free(lic_u);
}

Expand Down
15 changes: 12 additions & 3 deletions pkg/vere/io/unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,8 @@ _unix_create_dir(u3_udir* dir_u, u3_udir* par_u, u3_noun nam)

_unix_mkdir(pax_c);
_unix_watch_dir(dir_u, par_u, pax_c);

c3_free(pax_c);
}

static u3_noun _unix_update_node(u3_unix* unx_u, u3_unod* nod_u);
Expand Down Expand Up @@ -1336,16 +1338,13 @@ _unix_sync_file(u3_unix* unx_u, u3_udir* par_u, u3_noun nam, u3_noun ext, u3_nou
u3_ufil* fil_u = c3_malloc(sizeof(u3_ufil));
_unix_watch_file(unx_u, fil_u, par_u, pax_c);
fil_u->gum_w = gum_w;
goto _unix_sync_file_out;
}
else {
_unix_write_file_soft((u3_ufil*) nod_u, u3k(u3t(mim)));
}
}

c3_free(pax_c);

_unix_sync_file_out:
u3z(mim);
}

Expand Down Expand Up @@ -1402,6 +1401,8 @@ _unix_sync_change(u3_unix* unx_u, u3_udir* dir_u, u3_noun pax, u3_noun mim)
}

_unix_sync_change(unx_u, (u3_udir*) nod_u, u3k(t_pax), mim);

c3_free(nam_c);
}
}
u3z(pax);
Expand Down Expand Up @@ -1580,6 +1581,14 @@ _unix_io_exit(u3_auto* car_u)
{
u3_unix* unx_u = (u3_unix*)car_u;

u3_umon* mon_u = unx_u->mon_u;
u3_umon* nex_u;
while ( mon_u ) {
nex_u = mon_u->nex_u;
_unix_free_mount_point(unx_u, mon_u);
mon_u = nex_u;
}

u3z(unx_u->sat);
c3_free(unx_u->pax_c);
c3_free(unx_u);
Expand Down
7 changes: 7 additions & 0 deletions pkg/vere/mdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ typedef struct _mdns_payload {
void* context;
} mdns_payload;

#ifdef ASAN_ENABLED
void __lsan_ignore_object(const void *p);
#else
#define __lsan_ignore_object(p) ((void) (p))
#endif

static void close_cb(uv_handle_t* poll) {
mdns_payload* payload = (mdns_payload*)poll->data;
DNSServiceRefDeallocate(payload->sref);
Expand Down Expand Up @@ -182,6 +188,7 @@ void mdns_init(uint16_t port, bool fake, char* our, mdns_cb* cb, void* context)
# endif

mdns_payload* register_payload = (mdns_payload*)c3_calloc(sizeof(mdns_payload));
__lsan_ignore_object(register_payload);

DNSServiceErrorType err;

Expand Down