@@ -37,7 +37,7 @@ static int shm_id;
37
37
38
38
#define HAVOC_BLK_SMALL 2048
39
39
#define HAVOC_BLK_MEDIUM 4096
40
- #define HAVOC_BLK_LARGE 8192
40
+ #define HAVOC_BLK_LARGE 7400
41
41
42
42
43
43
#define HAVOC_BLK_XL 4096
@@ -50,10 +50,10 @@ static int cpu_aff = -1;
50
50
int round_cnt = 0 ;
51
51
int edge_gain = 0 ;
52
52
53
- int stage_num = 0 ;
53
+ int stage_num = 1 ;
54
54
int old = 0 ;
55
55
int now = 0 ;
56
- int fast = 0 ;
56
+ int fast = 1 ;
57
57
char * target_path ;
58
58
typedef uint8_t u8 ;
59
59
typedef uint16_t u16 ;
@@ -91,7 +91,7 @@ size_t len;
91
91
int loc [10240 ];
92
92
int sign [10240 ];
93
93
//int num_index[23] = {0,2,4,8,16,32,64,128,256,512,1024,1536,2048,2560,3072, 3584,4096,4608,5120, 5632,6144,6656,7103};
94
- int num_index [14 ] = {0 ,2 ,4 ,8 ,16 ,32 ,64 ,128 ,256 ,512 ,1024 ,2048 ,4096 ,8305 };
94
+ int num_index [14 ] = {0 ,2 ,4 ,8 ,16 ,32 ,64 ,128 ,256 ,512 ,1024 ,2048 ,4096 ,7405 };
95
95
96
96
// file list
97
97
char * * file_list ;
@@ -1312,14 +1312,14 @@ void gen_mutate_slow1(){
1312
1312
1313
1313
int tmout_cnt = 0 ;
1314
1314
//flip interesting locations within 10 iterations
1315
- for (int iter = 0 ;iter < 520 ; iter = iter + 1 ){
1315
+ for (int iter = 0 ;iter < 463 ; iter = iter + 1 ){
1316
1316
memcpy (out_buf1 , out_buf , len );
1317
1317
memcpy (out_buf2 , out_buf , len );
1318
1318
//find mutation range for every iteration
1319
1319
int low_index = iter * 16 ;
1320
1320
int up_index = 16 * (iter + 1 );
1321
- if (iter == 519 )
1322
- up_index = 8305 ;
1321
+ if (iter == 462 )
1322
+ up_index = 7405 ;
1323
1323
u8 up_step = 0 ;
1324
1324
u8 low_step = 0 ;
1325
1325
for (int index = low_index ; index < up_index ; index = index + 1 ){
@@ -1354,17 +1354,6 @@ void gen_mutate_slow1(){
1354
1354
else
1355
1355
out_buf1 [loc [index ]] = mut_val ;
1356
1356
}
1357
-
1358
- //total_execs++;
1359
- /*
1360
- char* mut_fn = alloc_printf("%s/id_%06d", out_dir, mut_cnt);
1361
- int mut_fd = open(mut_fn, O_WRONLY | O_CREAT | O_EXCL, 0600);
1362
- ck_write(mut_fd, out_buf1, len, mut_fn);
1363
- free(mut_fn);
1364
- close(mut_fd);
1365
- mut_cnt = mut_cnt + 1;
1366
- */
1367
-
1368
1357
write_to_testcase (out_buf1 , len );
1369
1358
int fault = run_target (exec_tmout );
1370
1359
if (fault != 0 ){
@@ -1424,16 +1413,6 @@ void gen_mutate_slow1(){
1424
1413
else
1425
1414
out_buf2 [loc [index ]] = mut_val ;
1426
1415
}
1427
- //total_execs++;
1428
- /*
1429
- char* mut_fn = alloc_printf("%s/id_%06d", out_dir, mut_cnt);
1430
- int mut_fd = open(mut_fn, O_WRONLY | O_CREAT | O_EXCL, 0600);
1431
- ck_write(mut_fd, out_buf2, len, mut_fn);
1432
- close(mut_fd);
1433
- free(mut_fn);
1434
- mut_cnt = mut_cnt + 1;
1435
- */
1436
-
1437
1416
write_to_testcase (out_buf2 , len );
1438
1417
int fault = run_target (exec_tmout );
1439
1418
if (fault != 0 ){
@@ -2061,11 +2040,13 @@ void fuzz_lop(char * grad_file, int sock){
2061
2040
if ((line_cnt % 10 ) == 0 ){
2062
2041
printf ("$$$$&&&& fuzz %s line_cnt %d\n" ,fn , line_cnt );
2063
2042
printf ("edge num %d\n" ,count_non_255_bytes (virgin_bits ));
2043
+ fflush (stdout );
2064
2044
}
2065
2045
}
2066
2046
else {
2067
2047
printf ("$$$$&&&& fuzz %s line_cnt %d\n" ,fn , line_cnt );
2068
2048
printf ("edge num %d\n" ,count_non_255_bytes (virgin_bits ));
2049
+ fflush (stdout );
2069
2050
}
2070
2051
2071
2052
//read seed into mem
0 commit comments