File tree 5 files changed +21
-1
lines changed
5 files changed +21
-1
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 4
4
// / Local value-set analysis
5
5
6
6
#include " local_value_set.h"
7
+ #include " external_value_set_expr.h"
7
8
8
9
#include < util/simplify_expr_class.h>
9
10
#include < util/infix.h>
17
18
// For documentation of members of `local_value_sett`, see the corresponding
18
19
// header file, `local_value_set.h`.
19
20
21
+ bool local_value_sett::do_not_use_precise_access_paths = false ;
22
+
20
23
void local_value_sett::make_union_adjusting_evs_types (
21
24
object_mapt &dest,
22
25
const object_mapt &src,
Original file line number Diff line number Diff line change 8
8
9
9
#include < pointer-analysis/value_set.h>
10
10
#include < util/json.h>
11
- #include " external_value_set_expr.h"
12
11
13
12
class local_value_sett : public value_sett
14
13
{
@@ -18,13 +17,21 @@ class local_value_sett : public value_sett
18
17
public:
19
18
typedef value_sett baset;
20
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
+
21
26
mutable bool precise_evs_curtailed_because_of_loop = false ;
22
27
23
28
// / Determines whether we should export precise or per_field external value
24
29
// / sets in function summaries.
25
30
// / \return
26
31
bool should_export_precise_external_value_sets () const
27
32
{
33
+ if (do_not_use_precise_access_paths)
34
+ return false ;
28
35
#ifdef DO_NOT_USE_PRECISE_EXTERNAL_VALUE_SETS
29
36
return false ;
30
37
#else
You can’t perform that action at this time.
0 commit comments