From f0d09103f7e6bff64d80c25071c6308223fa9bdb Mon Sep 17 00:00:00 2001
From: Anh <zenpoems@gmail.com>
Date: Mon, 10 Sep 2018 21:17:35 -0400
Subject: [PATCH] IDA as default, sanity checks on test for PIE

---
 bin/zafl.sh            | 5 ++++-
 test/gzip/test_gzip.sh | 6 ++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/bin/zafl.sh b/bin/zafl.sh
index 6117775..f9b85df 100755
--- a/bin/zafl.sh
+++ b/bin/zafl.sh
@@ -32,7 +32,10 @@ shift
 shift
 
 # default is rida
-ida_or_rida=" -s meds_static=off -s rida=on "
+#ida_or_rida=" -s meds_static=off -s rida=on "
+
+# default is ida
+ida_or_rida=" "
 
 other_args=""
 # parse args
diff --git a/test/gzip/test_gzip.sh b/test/gzip/test_gzip.sh
index 70428f5..5c070ac 100755
--- a/test/gzip/test_gzip.sh
+++ b/test/gzip/test_gzip.sh
@@ -97,6 +97,12 @@ pushd ${session}
 setup
 
 
+file /bin/gzip | grep "shared object" >/dev/null 2>&1
+if [ $? -eq 0 ]; then
+	echo "PIE detected -- this test only designed for non-PIE"
+	exit 1
+fi
+
 # test setting of entry point via address
 ep=$( objdump -Mintel -d /bin/gzip | grep text | grep -v -i disassembly | cut -d' ' -f1 | sed 's/^00000000//g' )
 build_zafl gzip.stars.entrypoint.${ep}.zafl -o zafl:--stars -o "zafl:--entrypoint=$ep"
-- 
GitLab