From fe984d3f66bf3e84ae34538bf589b2869e0c4b59 Mon Sep 17 00:00:00 2001
From: jdh8d <jdh8d@git.zephyr-software.com>
Date: Tue, 21 Mar 2017 18:47:11 +0000
Subject: [PATCH] double helix vrs AWS support

Former-commit-id: ec4714af9eb95c0d83a3a5c6081f772c18c24547
---
 .gitattributes                                |  4 ++
 c++_examples/simple_throw.cpp                 | 40 +++++++++++++++++++
 ...bNoh_probNos_probBilr_probHeaprand_zipr.sh |  3 ++
 ...h_structNos_structNoc_probHeaprand_zipr.sh |  3 ++
 ...h_structNos_structNoc_probHeaprand_zipr.sh |  3 ++
 tools/generate_mvee_package.sh                |  8 ++--
 6 files changed, 57 insertions(+), 4 deletions(-)
 create mode 100644 c++_examples/simple_throw.cpp
 create mode 100755 tools/cfar_configs/cfar_probNol_probNoh_probNos_probBilr_probHeaprand_zipr.sh
 create mode 100755 tools/cfar_configs/cfar_structNog_structNol_structNoh_structNos_structNoc_probHeaprand_zipr.sh
 create mode 100755 tools/cfar_configs/cfar_structNol_structNoh_structNos_structNoc_probHeaprand_zipr.sh

diff --git a/.gitattributes b/.gitattributes
index 2bd839dda..8d5c41b4d 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -17,6 +17,7 @@ c++_examples/newdelete3.cpp -text
 c++_examples/newdelete4.cpp -text
 c++_examples/newdelete5.cpp -text
 c++_examples/newdelete6.cpp -text
+c++_examples/simple_throw.cpp -text
 c++_examples/throw.cpp -text
 cgc_spri/Makefile -text
 cgc_spri/spawn_with_spri_open.c -text
@@ -939,6 +940,7 @@ tools/cfar_configs/cfar_probNog_probSS_probDS_phase1_zipr.sh -text
 tools/cfar_configs/cfar_probNoh_probIlr_probP1_probHeaprand_probNos_strata.sh -text
 tools/cfar_configs/cfar_probNoh_probNos_probBilr_probP1_probHeaprand_zipr.sh -text
 tools/cfar_configs/cfar_probNol_probNoh_probIlr_probP1_probHeaprand_probNos_strata.sh -text
+tools/cfar_configs/cfar_probNol_probNoh_probNos_probBilr_probHeaprand_zipr.sh -text
 tools/cfar_configs/cfar_probNol_probNoh_probNos_probBilr_probP1_probHeaprand_zipr.sh -text
 tools/cfar_configs/cfar_probNos_probBilr_probP1_probHeaprand_zipr.sh -text
 tools/cfar_configs/cfar_probNos_structNoc_structP1Canaries_probHeaprand_zipr.sh -text
@@ -963,10 +965,12 @@ tools/cfar_configs/cfar_structNogOF_phase1_zipr.sh -text
 tools/cfar_configs/cfar_structNogOF_structSS_phase1_zipr.sh -text
 tools/cfar_configs/cfar_structNogOF_structSS_probDS_phase1_zipr.sh -text
 tools/cfar_configs/cfar_structNog_phase1_zipr.sh -text
+tools/cfar_configs/cfar_structNog_structNol_structNoh_structNos_structNoc_probHeaprand_zipr.sh -text
 tools/cfar_configs/cfar_structNog_structNol_structNoh_structNos_structNoc_structP1Canaries_probHeaprand_zipr.sh -text
 tools/cfar_configs/cfar_structNoh_probIlr_structP1Canaries_probHeaprand_structNos_strata.sh -text
 tools/cfar_configs/cfar_structNoh_structNos_structNoc_structP1Canaries_probHeaprand_zipr.sh -text
 tools/cfar_configs/cfar_structNol_structNoh_probIlr_structP1Canaries_probHeaprand_structNos_strata.sh -text
+tools/cfar_configs/cfar_structNol_structNoh_structNos_structNoc_probHeaprand_zipr.sh -text
 tools/cfar_configs/cfar_structNol_structNoh_structNos_structNoc_structP1Canaries_probHeaprand_zipr.sh -text
 tools/cfar_configs/cfar_structNos_structNoc_structP1Canaries_probHeaprand_zipr.sh -text
 tools/cfar_configs/cfar_structP1Canaries_zipr.sh -text
diff --git a/c++_examples/simple_throw.cpp b/c++_examples/simple_throw.cpp
new file mode 100644
index 000000000..9ef4f45ef
--- /dev/null
+++ b/c++_examples/simple_throw.cpp
@@ -0,0 +1,40 @@
+
+#include <iostream>
+#include <stdlib.h>
+using namespace std;
+
+int bar()
+{
+	if(getenv("THROW_INT")!=NULL)
+		throw int(3);
+	else if(getenv("THROW_float")!=NULL)
+		throw float(3.14);
+	else 
+		return 0;
+}
+
+int foo()
+{
+	return bar();
+
+}
+main()
+{
+
+	try	
+	{
+		return foo();
+	}
+	catch(int s)
+	{
+		cout<<"caught int:" << s << endl;
+	}
+	catch(...)
+	{
+		cout<<"caught unnamed"<<endl;
+	}
+
+	return 1;
+
+}
+
diff --git a/tools/cfar_configs/cfar_probNol_probNoh_probNos_probBilr_probHeaprand_zipr.sh b/tools/cfar_configs/cfar_probNol_probNoh_probNos_probBilr_probHeaprand_zipr.sh
new file mode 100755
index 000000000..35399c59b
--- /dev/null
+++ b/tools/cfar_configs/cfar_probNol_probNoh_probNos_probBilr_probHeaprand_zipr.sh
@@ -0,0 +1,3 @@
+#!/bin/bash 
+
+$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step non_overlapping_stack=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --config_name $(basename $0 .sh|sed "s/cfar_//") --step noh=on --step nol=on
diff --git a/tools/cfar_configs/cfar_structNog_structNol_structNoh_structNos_structNoc_probHeaprand_zipr.sh b/tools/cfar_configs/cfar_structNog_structNol_structNoh_structNos_structNoc_probHeaprand_zipr.sh
new file mode 100755
index 000000000..042a1d9e5
--- /dev/null
+++ b/tools/cfar_configs/cfar_structNog_structNol_structNoh_structNos_structNoc_probHeaprand_zipr.sh
@@ -0,0 +1,3 @@
+#!/bin/bash 
+
+$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step-option zipr:"--zipr:seed $$" --structured_noc --structured_nos --step-option zipr:"--large_only:on true" --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --structured_nog --step-option zipr:"--large_only:nog_on true" --step noh=on --step nol=on
diff --git a/tools/cfar_configs/cfar_structNol_structNoh_structNos_structNoc_probHeaprand_zipr.sh b/tools/cfar_configs/cfar_structNol_structNoh_structNos_structNoc_probHeaprand_zipr.sh
new file mode 100755
index 000000000..f1648b7ce
--- /dev/null
+++ b/tools/cfar_configs/cfar_structNol_structNoh_structNos_structNoc_probHeaprand_zipr.sh
@@ -0,0 +1,3 @@
+#!/bin/bash 
+
+$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step-option zipr:"--zipr:seed $$" --structured_noc --structured_nos --step-option zipr:"--large_only:on true" --step non_overlapping_stack=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --config_name $(basename $0 .sh|sed "s/cfar_//") --step noh=on --step nol=on
diff --git a/tools/generate_mvee_package.sh b/tools/generate_mvee_package.sh
index e18f97f93..491c04098 100755
--- a/tools/generate_mvee_package.sh
+++ b/tools/generate_mvee_package.sh
@@ -417,10 +417,10 @@ finalize_json()
 			mkdir -p $new_variant_dir/bin
 			mkdir -p $new_variant_dir/bin/peasoup_executable_dir/
 			cp $full_exe_dir/$main_exe $new_variant_dir/bin
-			cp $full_exe_dir/peasoup_executable_dir/*.so $new_variant_dir/bin/peasoup_executable_dir
-			cp $full_exe_dir/peasoup_executable_dir/*.map $new_variant_dir/bin/peasoup_executable_dir
-			cp $full_exe_dir/peasoup_executable_dir/*json $new_variant_dir/bin/peasoup_executable_dir
-			cp $full_exe_dir/peasoup_executable_dir/*nol $new_variant_dir/bin/peasoup_executable_dir
+			cp $full_exe_dir/peasoup_executable_dir/*.so $new_variant_dir/bin/peasoup_executable_dir 2> /dev/null 
+			cp $full_exe_dir/peasoup_executable_dir/*.map $new_variant_dir/bin/peasoup_executable_dir 2> /dev/null 
+			cp $full_exe_dir/peasoup_executable_dir/*json $new_variant_dir/bin/peasoup_executable_dir 2> /dev/null 
+			cp $full_exe_dir/peasoup_executable_dir/*nol $new_variant_dir/bin/peasoup_executable_dir 2> /dev/null 
 
 			# echo "exe_dir=$exe_dir"
 
-- 
GitLab