@@ -41,10 +41,11 @@ DEFINE_string(output_test_dir, InputOutputGroup, "", "Directory where tests will
4141DEFINE_bool (take_over , ExecutionGroup , false, "Replay test cases in take-over mode." );
4242DEFINE_bool (abort_on_fail , ExecutionGroup , false, "Abort on file replay failure (useful in file fuzzing)." );
4343DEFINE_bool (exit_on_fail , ExecutionGroup , false, "Exit with status 255 on test failure." );
44- DEFINE_bool (verbose_reads , ExecutionGroup , false, "Report on bytes being read during execution of test." );
4544DEFINE_int (min_log_level , ExecutionGroup , 0 , "Minimum level of logging to output (default 2, 0=debug, 1=trace, 2=info, ...)." );
4645DEFINE_int (timeout , ExecutionGroup , 120 , "Timeout for brute force fuzzing." );
4746DEFINE_uint (num_workers , ExecutionGroup , 1 , "Number of workers to spawn for testing and test generation." );
47+ DEFINE_bool (verbose_reads , ExecutionGroup , false, "Report on bytes being read during execution of test." );
48+ DEFINE_bool (verbose_crash_trace , ExecutionGroup , false, "If test crashes, report an execution backtrace after abrupt exit." );
4849
4950/* Fuzzing and symex related options, baked in to perform analysis-related tasks without auxiliary tools */
5051DEFINE_bool (fuzz , AnalysisGroup , false, "Perform brute force unguided fuzzing." );
@@ -254,7 +255,7 @@ void DeepState_SwarmAssignCStr_C(const char* file, unsigned line, int stype,
254255 if (NULL == str ) {
255256 DeepState_Abandon ("Attempted to populate null pointer." );
256257 }
257- char swarm_allowed [256 ];
258+ char swarm_allowed [256 ];
258259 if (allowed == 0 ) {
259260 /* In swarm mode, if there is no allowed string, create one over all chars. */
260261 for (int i = 0 ; i < 255 ; i ++ ) {
@@ -306,7 +307,7 @@ char *DeepState_SwarmCStr_C(const char* file, unsigned line, int stype,
306307 if (NULL == str ) {
307308 DeepState_Abandon ("Can't allocate memory" );
308309 }
309- char swarm_allowed [256 ];
310+ char swarm_allowed [256 ];
310311 if (allowed == 0 ) {
311312 /* In swarm mode, if there is no allowed string, create one over all chars. */
312313 for (int i = 0 ; i < 255 ; i ++ ) {
@@ -347,14 +348,14 @@ void DeepState_SymbolizeCStr_C(char *begin, const char* allowed) {
347348void DeepState_SwarmSymbolizeCStr_C (const char * file , unsigned line , int stype ,
348349 char * begin , const char * allowed ) {
349350 if (begin && begin [0 ]) {
350- char swarm_allowed [256 ];
351+ char swarm_allowed [256 ];
351352 if (allowed == 0 ) {
352353 /* In swarm mode, if there is no allowed string, create one over all chars. */
353354 for (int i = 0 ; i < 255 ; i ++ ) {
354355 swarm_allowed [i ] = i + 1 ;
355356 }
356357 swarm_allowed [255 ] = 0 ;
357- allowed = (const char * )& swarm_allowed ;
358+ allowed = (const char * )& swarm_allowed ;
358359 }
359360 uint32_t allowed_size = strlen (allowed );
360361 struct DeepState_SwarmConfig * sc = DeepState_GetSwarmConfig (allowed_size , file , line , stype );
@@ -668,7 +669,7 @@ extern void DeepState_CleanUp() {
668669 free (DeepState_GeneratedStrings [i ]);
669670 }
670671 DeepState_GeneratedStringsIndex = 0 ;
671-
672+
672673 for (int i = 0 ; i < DeepState_SwarmConfigsIndex ; i ++ ) {
673674 free (DeepState_SwarmConfigs [i ]-> file );
674675 free (DeepState_SwarmConfigs [i ]-> fmap );
@@ -1116,6 +1117,7 @@ enum DeepState_TestRunResult DeepState_FuzzOneTestCase(struct DeepState_TestInfo
11161117
11171118 enum DeepState_TestRunResult result = DeepState_ForkAndRunTest (test );
11181119
1120+
11191121 if (result == DeepState_TestRunCrash ) {
11201122 DeepState_LogFormat (DeepState_LogError , "Crashed: %s" , test -> test_name );
11211123
0 commit comments