-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Labels
bugFor modifications that fix a flaw in the code.For modifications that fix a flaw in the code.
Description
When the worker decides to send a message to manager, the link to that manager could be invalid, and this could be intentional. So we must verify that manager link is valid, otherwise the worker would run into segfault.
For example, the code in vine_cache_prune looks like:
if (f->cache_level <= level) {
vine_cache_remove(c, cachename, 0);
}
It passes a NULL pointer as the manager link argument:
int vine_cache_remove(struct vine_cache *c, const char *cachename, struct link *manager)
When vine_cache_remove invokes vine_worker_send_cache_invalid, a segmentation fault can occur if we don't check if that link is valid.
A gdb screeshot for this error captured on a worker process:

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugFor modifications that fix a flaw in the code.For modifications that fix a flaw in the code.