Skip to content
Snippets Groups Projects
Commit 020919ba authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

Update to allow persistent mode to work properly via ZAFL_DRIVER_SETS_UP_MAP

parent 1b48865f
No related branches found
No related tags found
No related merge requests found
......@@ -279,9 +279,11 @@ static void zafl_setupAflTracemapSharedMemory()
{
if (getenv("ZAFL_DEBUG")) debug = 1;
if (tracemap_shared_memory_is_setup)
return;
zafl_prev_id = 0;
zafl_trace_map = NULL;
......@@ -296,6 +298,12 @@ static void zafl_setupAflTracemapSharedMemory()
// setup the area for storing prev_id and context_id 4K away from the end of the trace map
void* vars_addr = (void*)(shmat_addr + AFL_VARS_OFFSET);
zafl_setupAflVariablesMemory(vars_addr);
if (getenv("ZAFL_DRIVER_SETS_UP_MAP"))
{
tracemap_shared_memory_is_setup=1;
zafl_trace_map=shmat_addr;
return;
}
}
char *shm_env_var = getenv(SHM_ENV_VAR);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment