Skip to content

Commit f52b5fc

Browse files
davidpichardiefacebook-github-bot
authored andcommitted
Upgrading opam dependencies with last versions of Sawja and Javalib
Summary: Sawja and Javalib have recently released new versions that drop off the camlp4 dependency. This is a minimal diff in order to update infer opam depedencies. Last (1.5.7) generates invokedynamic, but work on InvokeDynamic is still in progress in Infer and not activated here yet. In this version, the Java frontend will still replace any InvokeDynamic by a dummy InvokeStatic call (as introduced by Jeremy a long time ago). Reviewed By: jvillard Differential Revision: D17662979 fbshipit-source-id: f686ba442
1 parent 362e9cc commit f52b5fc

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

infer/src/java/jTrans.ml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,10 @@ let instruction (context : JContext.t) pc instr : translation =
10871087
trans_virtual_call cn I_Virtual
10881088
| JBir.InterfaceCall cn ->
10891089
trans_virtual_call cn I_Interface )
1090+
| InvokeDynamic (var_opt, _bm, _ms, _args) ->
1091+
let _var = match var_opt with None -> assert false | Some var -> var in
1092+
raise (Frontend_error "InvokeDynamic not expected here")
1093+
(* We will not get any invokedynamic in the current setting *)
10901094
| InvokeNonVirtual (var_opt, obj, cn, ms, args) ->
10911095
let instrs, sil_obj_expr, sil_obj_type = expression context pc obj in
10921096
let callee_procname, call_instrs =
@@ -1266,19 +1270,19 @@ let instruction (context : JContext.t) pc instr : translation =
12661270
| Nop ->
12671271
Skip
12681272
| Formula _ ->
1269-
(* Sawja formulas are not generated with the current used
1273+
(* Sawja formulas are not generated with the current used
12701274
flags '~formula:false' *)
12711275
Skip
12721276
| Check _ ->
1273-
(* Infer only considers 3 kinds of runtime error exceptions
1277+
(* Infer only considers 3 kinds of runtime error exceptions
12741278
currently: NullPointer, ArrayBound, Cast. And only when
12751279
Config.tracing=true. *)
12761280
Skip
12771281
| MayInit _ ->
1278-
(* Infer ignores Sawja MayInit instruction. This instruction
1279-
makes explicit the implicit Java mechanism of class static
1280-
initialization (the first time the VM encounters a class,
1281-
it runs code about it). This may remove inter-procedural
1282+
(* Infer ignores Sawja MayInit instruction. This instruction
1283+
makes explicit the implicit Java mechanism of class static
1284+
initialization (the first time the VM encounters a class,
1285+
it runs code about it). This may remove inter-procedural
12821286
edges in Infer analyses *)
12831287
Skip
12841288
with Frontend_error s ->

opam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ depends: [
3434
"ctypes" {>="0.9.2"}
3535
"dune" {build & >="1.0"}
3636
"elina" {>="1.1"}
37-
"javalib" {>="3.1"}
37+
"javalib" {>="3.1.1"}
3838
"mtime"
3939
"ocaml" {>="4.06.0"}
4040
"ocamlfind" {build}
@@ -43,7 +43,7 @@ depends: [
4343
"parmap" {>="1.0-rc8"}
4444
"ppx_deriving" {>="4.1"}
4545
"ppx_fields_conv" {>="v0.12.0" & < "v0.13"}
46-
"sawja" {>="1.5.4"}
46+
"sawja" {>="1.5.7"}
4747
"sqlite3"
4848
"utop" {with-test}
4949
"xmlm" {>="1.2.0"}

opam.locked

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
opam-version: "2.0"
22
name: "infer"
3-
version: "0.16.0"
3+
version: "0.17.0"
44
synopsis: "A static analyzer for Java, C, C++, and Objective-C"
55
maintainer: "the infer team"
66
authors: "Facebook"
@@ -36,7 +36,6 @@ depends: [
3636
"bin_prot" {= "v0.12.0"}
3737
"biniou" {= "1.2.0"}
3838
"camlidl" {= "1.05"}
39-
"camlp4" {= "4.07+1"}
4039
"camlzip" {= "1.08"}
4140
"cmdliner" {= "1.0.4"}
4241
"conf-autoconf" {= "0.1"}
@@ -53,13 +52,14 @@ depends: [
5352
"cppo" {= "1.6.6"}
5453
"ctypes" {= "0.14.0"}
5554
"dune" {= "1.10.0"}
55+
"dune-configurator" {= "1.0.0"}
5656
"easy-format" {= "1.3.1"}
5757
"elina" {= "1.1"}
5858
"extlib" {= "1.7.5"}
5959
"fieldslib" {= "v0.12.0"}
6060
"integers" {= "0.2.2"}
6161
"jane-street-headers" {= "v0.12.0"}
62-
"javalib" {= "3.1"}
62+
"javalib" {= "3.1.1"}
6363
"jbuilder" {= "transition"}
6464
"jst-config" {= "v0.12.0"}
6565
"menhir" {= "20190626"}
@@ -111,7 +111,7 @@ depends: [
111111
"ppxlib" {= "0.8.0"}
112112
"re" {= "1.9.0"}
113113
"result" {= "1.4"}
114-
"sawja" {= "1.5.6"}
114+
"sawja" {= "1.5.7"}
115115
"seq" {= "base"}
116116
"sexplib" {= "v0.12.0"}
117117
"sexplib0" {= "v0.12.0"}

0 commit comments

Comments
 (0)