summaryrefslogtreecommitdiff
path: root/debian/patches/no_sanity
blob: faa9d3f70de0a5023a0e96d543e634135a44c378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
Author: Michael R. Crusoe <michael.crusoe@gmail.com>
Description: save resources by not making/testing the -fsantize variants
--- a/Makefile
+++ b/Makefile
@@ -189,15 +189,6 @@ BUILD_CPPS_MAIN := $(BUILD_CPPS) bowtie_
 SEARCH_FRAGMENTS := $(wildcard search_*_phase*.c)
 VERSION := $(shell cat BOWTIE2_VERSION)
 
-SANITIZER_FLAGS :=
-ifeq (0,$(shell $(CXX) -E -fsanitize=address,undefined btypes.h > /dev/null 2>&1; echo $$?))
-  SANITIZER_FLAGS := -fsanitize=address,undefined
-else ifeq (0,$(shell $(CXX) -E -fsanitize=address btypes.h > /dev/null 2>&1; echo $$?))
-  SANITIZER_FLAGS := -fsanitize=address
-else ifeq (0,$(shell $(CXX) -E -fsanitize=undefined btypes.h > /dev/null 2>&1; echo $$?))
-  SANITIZER_FLAGS := -fsanitize=undefined
-endif
-
 DEBUG_FLAGS    := -O0 -g3 $(SSE_FLAG)
 RELEASE_FLAGS  := -O3 $(SSE_FLAG) -funroll-loops -g3
 NOASSERT_FLAGS := -DNDEBUG
@@ -217,15 +208,6 @@ BOWTIE2_BIN_LIST_DBG := bowtie2-build-s-
   bowtie2-align-l-debug \
   bowtie2-inspect-s-debug \
   bowtie2-inspect-l-debug
-BOWTIE2_BIN_LIST_SAN := bowtie2-build-s-sanitized \
-  bowtie2-build-l-sanitized \
-  bowtie2-align-s-sanitized \
-  bowtie2-align-l-sanitized \
-  bowtie2-inspect-s-sanitized \
-  bowtie2-inspect-l-sanitized
-ifndef SANITIZER_FLAGS
-        BOWTIE2_BIN_LIST_SAN =
-endif
 
 GENERAL_LIST := $(wildcard scripts/*.sh) \
   $(wildcard scripts/*.pl) \
@@ -277,10 +259,9 @@ endif
 .PHONY: all allall both both-debug
 
 all: $(BOWTIE2_BIN_LIST) ;
-allall: $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG) $(BOWTIE2_BIN_LIST_SAN) ;
+allall: $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG) ;
 both: bowtie2-align-s bowtie2-build-s bowtie2-align-l bowtie2-build-l ;
 both-debug: bowtie2-align-s-debug bowtie2-build-s-debug bowtie2-align-l-debug bowtie2-build-l-debug ;
-both-sanitized: bowtie2-align-s-sanitized bowtie2-build-s-sanitized bowtie2-align-l-sanitized bowtie2-build-l-sanitized ;
 
 DEFS := -fno-strict-aliasing \
   -DBOWTIE2_VERSION="\"`cat BOWTIE2_VERSION`\"" \
@@ -294,18 +275,11 @@ DEFS := -fno-strict-aliasing \
   $(CPPFLAGS) \
   $(CFLAGS)
 
-# set compiler flags for all sanitized builds
-ifdef BOWTIE2_BIN_LIST_SAN
-$(BOWTIE2_BIN_LIST_SAN): CXXFLAGS+=$(SANITIZER_FLAGS)
-else
-$(BOWTIE2_BIN_LIST_SAN): $(error "Compiler does not support...")
-endif
-
 #
 # bowtie2-build targets
 #
 
-bowtie2-build-s-sanitized bowtie2-build-s: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
+bowtie2-build-s: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
 	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 $(NOASSERT_FLAGS) -Wall \
 		$(CPPFLAGS) \
@@ -313,7 +287,7 @@ bowtie2-build-s-sanitized bowtie2-build-
 		$(SHARED_CPPS) $(BUILD_CPPS_MAIN) \
 		$(LDFLAGS) $(LDLIBS)
 
-bowtie2-build-l-sanitized bowtie2-build-l: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
+bowtie2-build-l: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
 	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_64BIT_INDEX $(NOASSERT_FLAGS) -Wall \
 		$(CPPFLAGS) \
@@ -341,7 +315,7 @@ bowtie2-build-l-debug: bt2_build.cpp $(S
 # bowtie2-align targets
 #
 
-bowtie2-align-s-sanitized bowtie2-align-s: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
+bowtie2-align-s: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
 	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 $(NOASSERT_FLAGS) -Wall \
 		$(CPPFLAGS) \
@@ -349,7 +323,7 @@ bowtie2-align-s-sanitized bowtie2-align-
 		$(SHARED_CPPS) $(SEARCH_CPPS_MAIN) \
 		$(LDFLAGS) $(LDLIBS)
 
-bowtie2-align-l-sanitized bowtie2-align-l: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
+bowtie2-align-l: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
 	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_64BIT_INDEX $(NOASSERT_FLAGS) -Wall \
 		$(CPPFLAGS) \
@@ -379,7 +353,7 @@ bowtie2-align-l-debug: bt2_search.cpp $(
 # bowtie2-inspect targets
 #
 
-bowtie2-inspect-s-sanitized bowtie2-inspect-s: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
+bowtie2-inspect-s: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
 	$(CXX) $(RELEASE_FLAGS) \
 		$(RELEASE_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_INSPECT_MAIN -Wall \
@@ -388,7 +362,7 @@ bowtie2-inspect-s-sanitized bowtie2-insp
 		$(SHARED_CPPS) \
 		$(LDFLAGS) $(LDLIBS)
 
-bowtie2-inspect-l-sanitized bowtie2-inspect-l: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
+bowtie2-inspect-l: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
 	$(CXX) $(RELEASE_FLAGS) \
 		$(RELEASE_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_INSPECT_MAIN  -DBOWTIE_64BIT_INDEX -Wall \
@@ -589,7 +563,7 @@ test: simple-test
 
 .PHONY: clean
 clean:
-	rm -f $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG) $(BOWTIE2_BIN_LIST_SAN) \
+	rm -f $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG) \
 	$(addsuffix .exe,$(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG)) \
 	bowtie2-*.zip
 	rm -f core.* .tmp.head
--- a/bowtie2
+++ b/bowtie2
@@ -122,7 +122,6 @@ getBt2Desc(\%desc);
 sub isWrapped($) { return defined($wrapped{$_[0]}); }
 
 my $debug = 0;
-my $sanitized = 0;
 my %read_fns = ();
 my %read_compress = ();
 my $cap_out = undef;       # Filename for passthrough
@@ -184,7 +183,6 @@ GetOptions(
         "keep"                          => \$keep,
         "verbose"                       => \$verbose,
         "debug"                         => \$debug,
-        "sanitized"                     => \$sanitized,
         "large-index"                   => \$large_idx,
         "no-unal"                       => \$no_unal,
         "un=s"                          => \&handle_un_or_al,
@@ -473,9 +471,6 @@ my $suffix = "";
 if ($debug) {
         $suffix = "-debug";
 }
-elsif($sanitized) {
-        $suffix = "-sanitized";
-}
 
 # Construct command invoking bowtie2-align
 quote_params(\@bt2_args);
--- a/bowtie2-build
+++ b/bowtie2-build
@@ -46,7 +46,6 @@ def main():
 
     group = parser.add_mutually_exclusive_group()
     group.add_argument('--debug', action='store_true')
-    group.add_argument('--sanitized', action='store_true')
 
     logging.basicConfig(level=logging.ERROR,
                         format='%(levelname)s: %(message)s'
@@ -69,9 +68,9 @@ def main():
         build_bin_spec += '-debug'
         build_bin_l += '-debug'
 
-    if script_options.sanitized:
-        build_bin_spec += '-sanitized'
-        build_bin_l += '-sanitized'
+#    if script_options.sanitized:
+#        build_bin_spec += '-sanitized'
+#        build_bin_l += '-sanitized'
 
     fastas = []
     if '-c' not in argv and len(argv) >= 2:
--- a/bowtie2-inspect
+++ b/bowtie2-inspect
@@ -33,7 +33,6 @@ def main():
 
     group = parser.add_mutually_exclusive_group()
     group.add_argument('--debug', action='store_true')
-    group.add_argument('--sanitized', action='store_true')
 
     parser.add_argument('--verbose', action='store_true')
     parser.add_argument('--large-index', action='store_true')
@@ -60,10 +59,6 @@ def main():
         inspect_bin_spec += '-debug'
         inspect_bin_l += '-debug'
 
-    if script_options.sanitized:
-        inpsect_bin_spec += '-sanitized'
-        inspect_bin_l += '-sanitized'
-
     if script_options.large_index:
         inspect_bin_spec = os.path.join(ex_path,inspect_bin_l)
     elif len(argv) >= 1:
--- a/scripts/test/simple_tests.pl
+++ b/scripts/test/simple_tests.pl
@@ -4605,7 +4605,7 @@ sub runbowtie2($$$$$$$$$$$$$$$$$$$$$$$$$
 	close(FA);
 	if($do_build) {
 		my $build_args = "";
-		my $cmd = "$bowtie2_build $idx_type --quiet --sanity $build_args $fa .simple_tests.tmp";
+		my $cmd = "$bowtie2_build $idx_type --quiet $build_args $fa .simple_tests.tmp";
 		print "$cmd\n";
 		system($cmd);
 		($? == 0) || die "Bad exitlevel from bowtie2-build: $?";
@@ -4807,7 +4807,7 @@ sub matchSamOptionalFlags($$) {
 my $tmpfafn = ".simple_tests.pl.fa";
 my $last_ref = undef;
 foreach my $large_idx (undef,1) {
-	foreach my $binary_type ("release", "debug", "sanitized") {
+	foreach my $binary_type ("release", "debug") {
 		for (my $ci = 0; $ci < scalar(@cases); $ci++) {
 			my $c = $cases[$ci];
 			last unless defined($c);
--- a/scripts/test/simple_tests.sh
+++ b/scripts/test/simple_tests.sh
@@ -21,8 +21,8 @@
 
 #  simple_tests.sh
 
-export ASAN_OPTIONS=halt_on_error=1
-export UBSAN_OPTIONS=halt_on_error=1
+#export ASAN_OPTIONS=halt_on_error=1
+#export UBSAN_OPTIONS=halt_on_error=1
 
 #MAKE=`which gmake || which make`
 #$MAKE $* bowtie2-align-s \
--- a/bt2_build.cpp
+++ b/bt2_build.cpp
@@ -147,7 +147,6 @@ static void printUsage(ostream& out) {
 	out << "    --large-index           force generated index to be 'large', even if ref" << endl
 	    << "                            has fewer than 4 billion nucleotides" << endl
 	    << "    --debug                 use the debug binary; slower, assertions enabled" << endl
-	    << "    --sanitized             use sanitized binary; slower, uses ASan and/or UBSan" << endl
 	    << "    --verbose               log the issued command" << endl;
 	}
 	out << "    -a/--noauto             disable automatic -p/--bmax/--dcv memory-fitting" << endl
--- a/bt2_inspect.cpp
+++ b/bt2_inspect.cpp
@@ -81,7 +81,6 @@ static void printUsage(ostream& out) {
 		out << "  --large-index      force inspection of the 'large' index, even if a" << endl
 		    << "                     'small' one is present." << endl
 		    << "  --debug            use the debug binary; slower, assertions enabled" << endl
-		    << "  --sanitized        use sanitized binary; slower, uses ASan and/or UBSan" << endl
 		    << "  --verbose          log the issued command" << endl;
 	}
 	out << "  -a/--across <int>  Number of characters across in FASTA output (default: 60)" << endl