File tree 2 files changed +17
-2
lines changed
src/cdomain/value/cdomains
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -1012,9 +1012,9 @@ struct
1012
1012
let (+. ) = Z. add
1013
1013
1014
1014
(* (Must Null Set, May Null Set, Array Size) *)
1015
- include Lattice. Prod (Nulls ) (Idx )
1015
+ include Lattice. Prod (Nulls ) (struct include Idx let name () = " length " end )
1016
1016
1017
- let name () = " arrays containing null bytes "
1017
+ let name () = " ArrayNullBytes "
1018
1018
type idx = Idx .t
1019
1019
type value = Val .t
1020
1020
@@ -1815,6 +1815,17 @@ struct
1815
1815
else
1816
1816
f_get
1817
1817
1818
+ let delegate_if_no_nullbytes (a , n ) ffull fa =
1819
+ if get_bool " ana.base.arrays.nullbytes" then
1820
+ ffull (a, n)
1821
+ else
1822
+ fa a
1823
+
1824
+ let show x = delegate_if_no_nullbytes x show A. show
1825
+ let printXml f x = delegate_if_no_nullbytes x (printXml f) (A. printXml f)
1826
+ let to_yojson x = delegate_if_no_nullbytes x to_yojson A. to_yojson
1827
+ let pretty () x = delegate_if_no_nullbytes x (pretty () ) (A. pretty () )
1828
+
1818
1829
let construct a n =
1819
1830
if get_bool " ana.base.arrays.nullbytes" then
1820
1831
(a, n () )
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ module MustSet = struct
4
4
module M = SetDomain. Reverse (SetDomain. ToppedSet (IntOps. BigIntOps ) (struct let topname = " All Null" end ))
5
5
include M
6
6
7
+ let name () = " MustNullBytes"
8
+
7
9
let compute_set len =
8
10
List. init (Z. to_int len) Z. of_int
9
11
|> of_list
@@ -48,6 +50,8 @@ module MaySet = struct
48
50
module M = SetDomain. ToppedSet (IntOps. BigIntOps ) (struct let topname = " All Null" end )
49
51
include M
50
52
53
+ let name () = " MayNullBytes"
54
+
51
55
let elements ?max_size may_nulls_set =
52
56
if M. is_top may_nulls_set then
53
57
match max_size with
You can’t perform that action at this time.
0 commit comments