File tree 5 files changed +20
-0
lines changed
5 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 60
60
#include < taint-analysis/taint_security_scanner.h>
61
61
62
62
#include < pointer-analysis/evs_pretty_printer.h>
63
+ #include < pointer-analysis/local_value_set.h>
63
64
64
65
#include " sec_driver_parse_options.h"
65
66
@@ -170,6 +171,11 @@ int sec_driver_parse_optionst::doit()
170
171
return 6 ;
171
172
}
172
173
174
+ if (cmdline.isset (" do-not-use-precise-access-paths" ))
175
+ {
176
+ local_value_sett::do_not_use_precise_access_paths = true ;
177
+ }
178
+
173
179
if (cmdline.isset (" security-scanner" ))
174
180
{
175
181
return taint_do_security_scan (
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ class optionst;
40
40
" (lvsa-summary-directory):" \
41
41
" (local-value-set-analysis)(show-value-sets)(lvsa-function):" \
42
42
" (security-scanner):" \
43
+ " (do-not-use-precise-access-paths)" \
43
44
" (rebuild-taint-cache)" \
44
45
UI_MESSAGE_OPTIONS \
45
46
JAVA_BYTECODE_LANGUAGE_OPTIONS \
Original file line number Diff line number Diff line change 8
8
9
9
#include < sstream>
10
10
#include < util/std_expr.h>
11
+ #include " local_value_set.h"
11
12
12
13
// An access path entry, indicating that an external object
13
14
// was accessed using e.g. member-x--of-dereference (written
@@ -167,6 +168,8 @@ class external_value_set_exprt : public exprt
167
168
168
169
bool can_extend_to_precise () const
169
170
{
171
+ if (local_value_sett::do_not_use_precise_access_paths)
172
+ return false ;
170
173
#ifdef DO_NOT_USE_PRECISE_EXTERNAL_VALUE_SETS
171
174
return false ;
172
175
#else
Original file line number Diff line number Diff line change 18
18
// For documentation of members of `local_value_sett`, see the corresponding
19
19
// header file, `local_value_set.h`.
20
20
21
+ bool local_value_sett::do_not_use_precise_access_paths = false ;
22
+
21
23
void local_value_sett::make_union_adjusting_evs_types (
22
24
object_mapt &dest,
23
25
const object_mapt &src,
Original file line number Diff line number Diff line change @@ -17,13 +17,21 @@ class local_value_sett : public value_sett
17
17
public:
18
18
typedef value_sett baset;
19
19
20
+ // / Quick hack to allow turning of precise access paths via a command line
21
+ // / option. If this is still in the code in 2019 then shoot Chris Smowton
22
+ // / and Nathan Phillips for allowing me to do it.
23
+ static bool do_not_use_precise_access_paths;
24
+
25
+
20
26
mutable bool precise_evs_curtailed_because_of_loop = false ;
21
27
22
28
// / Determines whether we should export precise or per_field external value
23
29
// / sets in function summaries.
24
30
// / \return
25
31
bool should_export_precise_external_value_sets () const
26
32
{
33
+ if (do_not_use_precise_access_paths)
34
+ return false ;
27
35
#ifdef DO_NOT_USE_PRECISE_EXTERNAL_VALUE_SETS
28
36
return false ;
29
37
#else
You can’t perform that action at this time.
0 commit comments