@@ -33,7 +33,10 @@ use crate::cmps::EXTENDED_CMPLOG_MAP_PTR;
33
33
use crate :: cmps:: { AflppCmpLogMap , CMPLOG_MAP_PTR } ;
34
34
use crate :: coverage:: { __afl_map_size, EDGES_MAP_PTR , INPUT_LENGTH_PTR , INPUT_PTR , SHM_FUZZING } ;
35
35
#[ cfg( any( target_os = "linux" , target_vendor = "apple" ) ) ]
36
- use crate :: coverage:: { __token_start, __token_stop} ;
36
+ use crate :: {
37
+ coverage:: { __token_start, __token_stop} ,
38
+ has_autotokens,
39
+ } ;
37
40
38
41
/// SAFETY:
39
42
///
@@ -124,6 +127,7 @@ fn map_shared_memory_common<SHM: ShMemProvider>(
124
127
} else {
125
128
map_size_default_fallback
126
129
} ;
130
+
127
131
let shmem = shmem_provider. shmem_from_id_and_size ( ShMemId :: from_string ( & id_str) , map_size) ?;
128
132
129
133
Ok ( shmem_into_raw ( shmem) )
@@ -413,7 +417,7 @@ fn start_forkserver_internal<P: ForkserverParent>(
413
417
forkserver_parent : & mut P ,
414
418
) -> Result < ForkserverState , Error > {
415
419
#[ cfg( any( target_os = "linux" , target_vendor = "apple" ) ) ]
416
- let autotokens_on = unsafe { !__token_start . is_null ( ) && !__token_stop . is_null ( ) } ;
420
+ let autotokens_on = has_autotokens ( ) ;
417
421
let sharedmem_fuzzing = unsafe { SHM_FUZZING == 1 } ;
418
422
419
423
// Parent supports testcases via shared map - and the user wants to use it. Tell AFL.
0 commit comments