From 8ccfeffc45b04faad003a421e450c87e53ebc3b5 Mon Sep 17 00:00:00 2001
From: an7s <an7s@git.zephyr-software.com>
Date: Wed, 13 May 2015 14:54:28 +0000
Subject: [PATCH] new default min malloc padding = 256 bytes turn simple fuzz
 back on watch_allocate step now supports multiple warning files

Former-commit-id: db07653cd62b0c14df8226f611c7ac6de0c45aec
---
 tools/ps_analyze.sh               |  8 ++++----
 tools/ps_analyze_c2e.sh           |  3 ---
 tools/ps_analyze_cgc.sh           | 14 ++------------
 tools/sfuzz/replay_seed_inputs.sh |  1 +
 4 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/tools/ps_analyze.sh b/tools/ps_analyze.sh
index 267df7748..5087e96f6 100755
--- a/tools/ps_analyze.sh
+++ b/tools/ps_analyze.sh
@@ -892,11 +892,11 @@ perform_step fast_annot meds_static $PEASOUP_HOME/tools/fast_annot.sh
 # @todo: 2nd arg is the benchmark name but we're currently passing in
 #        the binary in
 # 
-perform_step sfuzz none $PEASOUP_HOME/tools/do_sfuzz.sh $newname.ncexe $orig_exe crash.cso
+perform_step sfuzz none $PEASOUP_HOME/tools/do_sfuzz.sh $newname.ncexe $orig_exe crash.sfuzz.cso
 # if crash found, feed the cso file to the watch allocate step
-#if [ -f crash.cso  ]; then
-#	step_options_watch_allocate="$step_options_watch_allocate --warning_file=crash.cso"
-#fi
+if [ -f crash.sfuzz.cso  ]; then
+	step_options_watch_allocate="$step_options_watch_allocate --warning_file=crash.sfuzz.cso"
+fi
 
 #
 # cinderella: infer malloc and other libc functions
diff --git a/tools/ps_analyze_c2e.sh b/tools/ps_analyze_c2e.sh
index 757db84fb..73c34d1c5 100755
--- a/tools/ps_analyze_c2e.sh
+++ b/tools/ps_analyze_c2e.sh
@@ -8,6 +8,3 @@ $PEASOUP_HOME/tools/ps_analyze.sh $* 	   	\
 	--step c2e=on \
 
 cgc2elf $2
-
-
-# appfw was working?
diff --git a/tools/ps_analyze_cgc.sh b/tools/ps_analyze_cgc.sh
index d782a36f4..37fecef8d 100755
--- a/tools/ps_analyze_cgc.sh
+++ b/tools/ps_analyze_cgc.sh
@@ -16,26 +16,16 @@
 
 export FIX_CALLS_FIX_ALL_CALLS=1
 
-# by default simple fuzzing is on
-# but turn off sfuzz if warning file already specified on the command line
-#SFUZZ="on"
-SFUZZ="off"
-echo "$@" | grep "watch_allocate"  | grep "warning_file" &>/dev/null
-if [ $? -eq 0 ]; then
-	SFUZZ="off"
-	echo "Turning off simple fuzz as a warning_file has been specified for the watch_allocate step"
-fi
-
 $PEASOUP_HOME/tools/ps_analyze.sh $* 	\
 	--step spawner=off 		\
 	--step appfw=off 		\
 	--step find_strings=off 	\
 	--step preLoaded_ILR1=off	\
 	--step preLoaded_ILR2=off	\
-	--step sfuzz=$SFUZZ	\
+	--step sfuzz=on	\
 	--step cinderella=on	\
 	--step cgc_hlx=on	\
-	--step-option cgc_hlx:--do_malloc_padding=64 \
+	--step-option cgc_hlx:--do_malloc_padding=256 \
 	--step-option cgc_hlx:--shr_malloc_factor=5 \
 	--step-option cgc_hlx:--do_allocate_padding=4096 \
 	--step heaprand=off	\
diff --git a/tools/sfuzz/replay_seed_inputs.sh b/tools/sfuzz/replay_seed_inputs.sh
index 8445ee172..0e87ad812 100755
--- a/tools/sfuzz/replay_seed_inputs.sh
+++ b/tools/sfuzz/replay_seed_inputs.sh
@@ -27,6 +27,7 @@ do
 			echo $eip >> $crash_eip_file			
 		fi
 
+                echo "EIP: $eip"
 	fi
 done
 
-- 
GitLab