diff --git a/infer/src/IR/Ident.re b/infer/src/IR/Ident.re index f11bbee36..6e94b1983 100644 --- a/infer/src/IR/Ident.re +++ b/infer/src/IR/Ident.re @@ -18,7 +18,34 @@ let module L = Logging; let module F = Format; -type name = string [@@deriving compare]; +let module Name = { + type t = + | Primed + | Normal + | Footprint + | Spec + | FromString string + [@@deriving compare]; + let primed = "t"; + let normal = "n"; + let footprint = "f"; + let spec = "val"; + let from_string s => FromString s; + let to_string = + fun + | Primed => primed + | Normal => normal + | Footprint => footprint + | Spec => spec + | FromString s => s; + let equal n1 n2 => compare n1 n2 == 0; +}; + +type name = Name.t [@@deriving compare]; + +let name_spec = Name.Spec; + +let name_primed = Name.Primed; let equal_name x y => 0 == compare_name x y; @@ -46,7 +73,7 @@ let equal_kind x y => 0 == compare_kind x y; /* timestamp for a path identifier */ let path_ident_stamp = (-3); -type t = {kind: kind, name: name, stamp: int} [@@deriving compare]; +type t = {kind: kind, name: Name.t, stamp: int} [@@deriving compare]; /* most unlikely first */ let equal i1 i2 => i1.stamp === i2.stamp && i1.kind === i2.kind && equal_name i1.name i2.name; @@ -89,7 +116,7 @@ let module NameHash = Hashtbl.Make { /** Convert a string to a name */ -let string_to_name (s: string) => s; +let string_to_name = Name.from_string; /** Create a field name with the given position (field number in the CSU) */ @@ -97,7 +124,7 @@ let create_fieldname (n: Mangled.t) (position: int) => {fpos: position, fname: n /** Convert a name to a string. */ -let name_to_string (name: name) => name; +let name_to_string = Name.to_string; /** Convert a fieldname to a string. */ @@ -219,22 +246,6 @@ let module NameGenerator = { }; -/** Name used for primed tmp variables */ -let name_primed = string_to_name "t"; - - -/** Name used for normal tmp variables */ -let name_normal = string_to_name "n"; - - -/** Name used for footprint tmp variables */ -let name_footprint = string_to_name "f"; - - -/** Name used for spec variables */ -let name_spec = string_to_name "val"; - - /** Name used for the return variable */ let name_return = Mangled.from_string "return"; @@ -242,11 +253,11 @@ let name_return = Mangled.from_string "return"; /** Return the standard name for the given kind */ let standard_name kind => if (kind === KNormal || kind === KNone) { - name_normal + Name.Normal } else if (kind === KFootprint) { - name_footprint + Name.Footprint } else { - name_primed + Name.Primed }; diff --git a/infer/src/IR/Pvar.re b/infer/src/IR/Pvar.re index 853d6d8bc..13f5ce2b5 100644 --- a/infer/src/IR/Pvar.re +++ b/infer/src/IR/Pvar.re @@ -30,7 +30,10 @@ type pvar_kind = | Seed_var /** variable used to store the initial value of formal parameters */ [@@deriving compare] /** Names for program variables. */ -and t = {pv_name: Mangled.t, pv_kind: pvar_kind} [@@deriving compare]; +and t = {pv_hash: int, pv_name: Mangled.t, pv_kind: pvar_kind} [@@deriving compare]; + +let compare_alpha pv1 pv2 => + [%compare : (Mangled.t, pvar_kind)] (pv1.pv_name, pv1.pv_kind) (pv2.pv_name, pv2.pv_kind); let equal pvar1 pvar2 => compare pvar1 pvar2 == 0; @@ -270,9 +273,12 @@ let to_callee pname pvar => assert false }; +let name_hash (name: Mangled.t) => Hashtbl.hash name; + /** [mk name proc_name] creates a program var with the given function name */ let mk (name: Mangled.t) (proc_name: Procname.t) :t => { + pv_hash: name_hash name, pv_name: name, pv_kind: Local_var proc_name }; @@ -283,6 +289,7 @@ let get_ret_pvar pname => mk Ident.name_return pname; /** [mk_callee name proc_name] creates a program var for a callee function with the given function name */ let mk_callee (name: Mangled.t) (proc_name: Procname.t) :t => { + pv_hash: name_hash name, pv_name: name, pv_kind: Callee_var proc_name }; @@ -290,6 +297,7 @@ let mk_callee (name: Mangled.t) (proc_name: Procname.t) :t => { /** create a global variable with the given name */ let mk_global is_constexpr::is_constexpr=false is_pod::is_pod=true (name: Mangled.t) fname :t => { + pv_hash: name_hash name, pv_name: name, pv_kind: Global_var (fname, is_constexpr, is_pod) }; @@ -306,12 +314,12 @@ let mk_tmp name pname => { /** create an abduced return variable for a call to [proc_name] at [loc] */ let mk_abduced_ret (proc_name: Procname.t) (loc: Location.t) :t => { let name = Mangled.from_string ("$RET_" ^ Procname.to_unique_id proc_name); - {pv_name: name, pv_kind: Abduced_retvar proc_name loc} + {pv_hash: name_hash name, pv_name: name, pv_kind: Abduced_retvar proc_name loc} }; let mk_abduced_ref_param (proc_name: Procname.t) (pv: t) (loc: Location.t) :t => { let name = Mangled.from_string ("$REF_PARAM_" ^ Procname.to_unique_id proc_name); - {pv_name: name, pv_kind: Abduced_ref_param proc_name pv loc} + {pv_hash: name_hash name, pv_name: name, pv_kind: Abduced_ref_param proc_name pv loc} }; let get_source_file pvar => @@ -341,8 +349,9 @@ let get_initializer_pname {pv_name, pv_kind} => | _ => None }; -let module Set = PrettyPrintable.MakePPSet { +let module Set = PrettyPrintable.MakePPCompareSet { type nonrec t = t; let compare = compare; + let compare_pp = compare_alpha; let pp_element = pp pe_text; }; diff --git a/infer/src/IR/Pvar.rei b/infer/src/IR/Pvar.rei index 7c6b31c91..d23c9199b 100644 --- a/infer/src/IR/Pvar.rei +++ b/infer/src/IR/Pvar.rei @@ -30,6 +30,10 @@ type t [@@deriving compare]; let equal: t => t => bool; +/** Compare two pvar's in alphabetical order */ +let compare_alpha: t => t => int; + + /** Dump a program variable. */ let d: t => unit; diff --git a/infer/src/backend/preanal.ml b/infer/src/backend/preanal.ml index 045ccb0a8..0b3992699 100644 --- a/infer/src/backend/preanal.ml +++ b/infer/src/backend/preanal.ml @@ -124,12 +124,27 @@ module NullifyTransferFunctions = struct (reaching_defs', to_nullify) | None -> astate + let cache_node = ref (Procdesc.Node.dummy ()) + let cache_instr = ref Sil.skip_instr + + let last_instr_in_node node = + let get_last_instr () = + let instrs = CFG.instrs node in + match IList.rev instrs with + | instr :: _ -> instr + | [] -> Sil.skip_instr in + if node == !cache_node + then !cache_instr + else + begin + let last_instr = get_last_instr () in + cache_node := node; + cache_instr := last_instr; + last_instr + end + let is_last_instr_in_node instr node = - let rec is_last_instr instr = function - | [] -> true - | last_instr :: [] -> Sil.compare_instr instr last_instr = 0 - | _ :: instrs -> is_last_instr instr instrs in - is_last_instr instr (CFG.instrs node) + last_instr_in_node node == instr let exec_instr ((active_defs, to_nullify) as astate) extras node instr = let astate' = match instr with diff --git a/infer/src/base/PrettyPrintable.ml b/infer/src/base/PrettyPrintable.ml index c36f2d1f3..728cbd1a4 100644 --- a/infer/src/base/PrettyPrintable.ml +++ b/infer/src/base/PrettyPrintable.ml @@ -49,8 +49,18 @@ module MakePPSet (Ord : SetOrderedType) = struct let pp_element = Ord.pp_element let pp fmt s = - let pp_item fmt e = F.fprintf fmt "%a" Ord.pp_element e in - pp_collection ~pp_item fmt (elements s) + pp_collection ~pp_item:pp_element fmt (elements s) +end + +module MakePPCompareSet + (Ord : sig include SetOrderedType val compare_pp : t -> t -> int end) = struct + include Set.Make(Ord) + + let pp_element = Ord.pp_element + + let pp fmt s = + let elements_alpha = IList.sort Ord.compare_pp (elements s) in + pp_collection ~pp_item:pp_element fmt elements_alpha end module MakePPMap (Ord : MapOrderedType) = struct diff --git a/infer/src/base/PrettyPrintable.mli b/infer/src/base/PrettyPrintable.mli index 4216607eb..7c7a34daa 100644 --- a/infer/src/base/PrettyPrintable.mli +++ b/infer/src/base/PrettyPrintable.mli @@ -38,13 +38,15 @@ module type PPMap = sig end module MakePPSet : functor (Ord : SetOrderedType) -> sig - include Set.S with type elt = Ord.t - val pp_element : F.formatter -> Ord.t -> unit - val pp : F.formatter -> t -> unit + include PPSet with type elt = Ord.t end +(** Use a comparison function to determine the order of the elements printed *) +module MakePPCompareSet : + functor (Ord : sig include SetOrderedType val compare_pp : t -> t -> int end) -> sig + include PPSet with type elt = Ord.t + end + module MakePPMap : functor (Ord : MapOrderedType) -> sig - include Map.S with type key = Ord.t - val pp_key : F.formatter -> Ord.t -> unit - val pp : pp_value:(F.formatter -> 'a -> unit) -> F.formatter -> 'a t -> unit + include PPMap with type key = Ord.t end diff --git a/infer/src/checkers/var.ml b/infer/src/checkers/var.ml index af012a4e0..34fe725bd 100644 --- a/infer/src/checkers/var.ml +++ b/infer/src/checkers/var.ml @@ -29,6 +29,10 @@ let to_exp = function | ProgramVar pvar -> Exp.Lvar pvar | LogicalVar id -> Exp.Var id +let compare_alpha v1 v2 = match v1, v2 with + | ProgramVar pv1, ProgramVar pv2 -> Pvar.compare_alpha pv1 pv2 + | _ -> compare v1 v2 + let pp fmt = function | ProgramVar pv -> (Pvar.pp pe_text) fmt pv | LogicalVar id -> (Ident.pp pe_text) fmt id @@ -39,8 +43,9 @@ module Map = PrettyPrintable.MakePPMap(struct let pp_key = pp end) -module Set = PrettyPrintable.MakePPSet(struct +module Set = PrettyPrintable.MakePPCompareSet(struct type nonrec t = t let compare = compare + let compare_pp = compare_alpha let pp_element = pp end) diff --git a/infer/tests/codetoanalyze/java/tracing/issues.exp b/infer/tests/codetoanalyze/java/tracing/issues.exp index 02b6a2577..35add519f 100644 --- a/infer/tests/codetoanalyze/java/tracing/issues.exp +++ b/infer/tests/codetoanalyze/java/tracing/issues.exp @@ -20,9 +20,9 @@ codetoanalyze/java/infer/NullPointerExceptions.java, int NullPointerExceptions.n codetoanalyze/java/infer/NullPointerExceptions.java, int NullPointerExceptions.preconditionCheckStateTest(NullPointerExceptions$D), 1, PRECONDITION_NOT_MET, [start of procedure preconditionCheckStateTest(...),Taking false branch] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions$$$Class$Name$With$Dollars.npeWithDollars(), 3, java.lang.NullPointerException, [start of procedure npeWithDollars(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions$$$Class$Name$With$Dollars.npeWithDollars()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.badCheckShouldCauseNPE(), 2, java.lang.NullPointerException, [start of procedure badCheckShouldCauseNPE(),start of procedure getBool(),Taking false branch,return from a call to Boolean NullPointerExceptions.getBool(),Taking false branch,return from a call to void NullPointerExceptions.badCheckShouldCauseNPE()] -codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.derefNonThisGetterAfterCheckShouldNotCauseNPE(), 5, java.lang.NullPointerException, [start of procedure derefNonThisGetterAfterCheckShouldNotCauseNPE(),start of procedure NullPointerExceptions(),return from a call to NullPointerExceptions.(),Taking true branch,start of procedure getObj(),Taking false branch,return from a call to Object NullPointerExceptions.getObj(),Taking false branch,return from a call to void NullPointerExceptions.derefNonThisGetterAfterCheckShouldNotCauseNPE()] +codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.derefNonThisGetterAfterCheckShouldNotCauseNPE(), 5, java.lang.NullPointerException, [start of procedure derefNonThisGetterAfterCheckShouldNotCauseNPE(),start of procedure NullPointerExceptions(),return from a call to NullPointerExceptions.(),Taking true branch,start of procedure getObj(),Taking true branch,return from a call to Object NullPointerExceptions.getObj(),Taking true branch,Taking true branch,start of procedure getObj(),Taking false branch,return from a call to Object NullPointerExceptions.getObj(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.derefNonThisGetterAfterCheckShouldNotCauseNPE()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.derefNull(), 3, java.lang.NullPointerException, [start of procedure derefNull(),start of procedure derefUndefinedCallee(),start of procedure retUndefined(),Taking true branch,return from a call to Object NullPointerExceptions.retUndefined(),Taking true branch,return from a call to Object NullPointerExceptions.derefUndefinedCallee(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.derefNull()] -codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.derefUndefNullableRetWrapper(), 2, java.lang.NullPointerException, [start of procedure derefUndefNullableRetWrapper(),start of procedure undefNullableWrapper(),return from a call to Object NullPointerExceptions.undefNullableWrapper(),Taking true branch,return from a call to void NullPointerExceptions.derefUndefNullableRetWrapper()] +codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.derefUndefNullableRetWrapper(), 2, java.lang.NullPointerException, [start of procedure derefUndefNullableRetWrapper(),start of procedure undefNullableWrapper(),return from a call to Object NullPointerExceptions.undefNullableWrapper(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.derefUndefNullableRetWrapper()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.dereferenceAfterLoopOnList(NullPointerExceptions$L), 3, java.lang.NullPointerException, [start of procedure dereferenceAfterLoopOnList(...),start of procedure returnsNullAfterLoopOnList(...),Taking true branch,Taking true branch,Taking true branch,Taking true branch,Taking false branch,return from a call to Object NullPointerExceptions.returnsNullAfterLoopOnList(NullPointerExceptions$L),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.dereferenceAfterLoopOnList(NullPointerExceptions$L)] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.dereferenceAfterLoopOnList(NullPointerExceptions$L), 3, java.lang.NullPointerException, [start of procedure dereferenceAfterLoopOnList(...),start of procedure returnsNullAfterLoopOnList(...),Taking true branch,Taking true branch,Taking true branch,Taking true branch,Taking false branch,return from a call to Object NullPointerExceptions.returnsNullAfterLoopOnList(NullPointerExceptions$L),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.dereferenceAfterLoopOnList(NullPointerExceptions$L)] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.dereferenceAfterUnlock1(Lock), 5, java.lang.NullPointerException, [start of procedure dereferenceAfterUnlock1(...),Taking true branch,Taking true branch,exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.dereferenceAfterUnlock1(Lock)] @@ -33,8 +33,8 @@ codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions. codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionArrayLength(), 3, java.lang.NullPointerException, [start of procedure nullPointerExceptionArrayLength(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionArrayLength()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionCallArrayReadMethod(), 3, java.lang.NullPointerException, [start of procedure nullPointerExceptionCallArrayReadMethod(),Taking true branch,Taking true branch,start of procedure arrayReadShouldNotCauseSymexMemoryError(...),Taking true branch,Taking true branch,Taking true branch,return from a call to Object NullPointerExceptions.arrayReadShouldNotCauseSymexMemoryError(int),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionCallArrayReadMethod()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionCallArrayReadMethod(), 3, java.lang.NullPointerException, [start of procedure nullPointerExceptionCallArrayReadMethod(),Taking true branch,Taking true branch,start of procedure arrayReadShouldNotCauseSymexMemoryError(...),Taking true branch,Taking true branch,Taking true branch,return from a call to Object NullPointerExceptions.arrayReadShouldNotCauseSymexMemoryError(int),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionCallArrayReadMethod()] -codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionFromFailingFileOutputStreamConstructor(), 9, java.lang.NullPointerException, [start of procedure nullPointerExceptionFromFailingFileOutputStreamConstructor(),Taking true branch,return from a call to void NullPointerExceptions.nullPointerExceptionFromFailingFileOutputStreamConstructor()] -codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionFromFaillingResourceConstructor(), 8, java.lang.NullPointerException, [start of procedure nullPointerExceptionFromFaillingResourceConstructor(),Taking true branch,return from a call to void NullPointerExceptions.nullPointerExceptionFromFaillingResourceConstructor()] +codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionFromFailingFileOutputStreamConstructor(), 9, java.lang.NullPointerException, [start of procedure nullPointerExceptionFromFailingFileOutputStreamConstructor(),Taking true branch,exception java.io.IOException,return from a call to void NullPointerExceptions.nullPointerExceptionFromFailingFileOutputStreamConstructor()] +codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionFromFaillingResourceConstructor(), 8, java.lang.NullPointerException, [start of procedure nullPointerExceptionFromFaillingResourceConstructor(),Taking true branch,exception java.io.IOException,return from a call to void NullPointerExceptions.nullPointerExceptionFromFaillingResourceConstructor()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionUnlessFrameFails(), 6, java.lang.NullPointerException, [start of procedure nullPointerExceptionUnlessFrameFails(),start of procedure NullPointerExceptions$A(...),return from a call to NullPointerExceptions$A.(NullPointerExceptions),start of procedure frame(...),start of procedure id_generics(...),Taking true branch,return from a call to Object NullPointerExceptions.id_generics(NullPointerExceptions$A),Taking true branch,return from a call to NullPointerExceptions$A NullPointerExceptions.frame(NullPointerExceptions$A),Taking true branch,exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionUnlessFrameFails()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionWithNullArrayParameter(), 2, java.lang.NullPointerException, [start of procedure nullPointerExceptionWithNullArrayParameter(),start of procedure expectNotNullArrayParameter(...),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.expectNotNullArrayParameter(codetoanalyze.java.infer.NullPointerExceptions$A[]),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionWithNullArrayParameter()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionWithNullObjectParameter(), 2, java.lang.NullPointerException, [start of procedure nullPointerExceptionWithNullObjectParameter(),start of procedure expectNotNullObjectParameter(...),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.expectNotNullObjectParameter(NullPointerExceptions$A),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionWithNullObjectParameter()] @@ -42,7 +42,7 @@ codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions. codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.someNPEAfterResourceLeak(), 3, java.lang.NullPointerException, [start of procedure someNPEAfterResourceLeak(),start of procedure sourceOfNullWithResourceLeak(),start of procedure SomeResource(),return from a call to SomeResource.(),return from a call to T CloseableAsResourceExample.sourceOfNullWithResourceLeak(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.someNPEAfterResourceLeak()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.stringConstantEqualsFalseNotNPE_FP(), 11, java.lang.NullPointerException, [start of procedure stringConstantEqualsFalseNotNPE_FP(),Taking true branch,Taking true branch,Taking true branch,return from a call to void NullPointerExceptions.stringConstantEqualsFalseNotNPE_FP()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.testSystemGetPropertyReturn(), 2, RETURN_VALUE_IGNORED, [start of procedure testSystemGetPropertyReturn(),Taking true branch] -codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.testSystemGetPropertyReturn(), 3, java.lang.NullPointerException, [start of procedure testSystemGetPropertyReturn(),Taking true branch,return from a call to void NullPointerExceptions.testSystemGetPropertyReturn()] +codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.testSystemGetPropertyReturn(), 3, java.lang.NullPointerException, [start of procedure testSystemGetPropertyReturn(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.testSystemGetPropertyReturn()] codetoanalyze/java/tracing/ArrayIndexOutOfBoundsExceptionExample.java, void ArrayIndexOutOfBoundsExceptionExample.arrayIndexOutOfBoundsInCallee(), 3, java.lang.ArrayIndexOutOfBoundsException, [start of procedure arrayIndexOutOfBoundsInCallee(),start of procedure withFixedIndex(...),start of procedure callMethodFromArray(...),Taking true branch,Taking true branch,Taking true branch,Taking true branch,Taking true branch,Taking true branch,start of procedure f(),return from a call to void T2.f(),return from a call to void ArrayIndexOutOfBoundsExceptionExample.callMethodFromArray(codetoanalyze.java.tracing.T2[],int),return from a call to void ArrayIndexOutOfBoundsExceptionExample.withFixedIndex(codetoanalyze.java.tracing.T2[]),return from a call to void ArrayIndexOutOfBoundsExceptionExample.arrayIndexOutOfBoundsInCallee()] codetoanalyze/java/tracing/ArrayIndexOutOfBoundsExceptionExample.java, void ArrayIndexOutOfBoundsExceptionExample.callOutOfBound(), 3, java.lang.ArrayIndexOutOfBoundsException, [start of procedure callOutOfBound(),start of procedure callMethodFromArray(...),Taking true branch,exception java.lang.ArrayIndexOutOfBoundsException,return from a call to void ArrayIndexOutOfBoundsExceptionExample.callMethodFromArray(codetoanalyze.java.tracing.T2[],int),exception java.lang.ArrayIndexOutOfBoundsException,return from a call to void ArrayIndexOutOfBoundsExceptionExample.callOutOfBound()] codetoanalyze/java/tracing/ArrayIndexOutOfBoundsExceptionExample.java, void ArrayIndexOutOfBoundsExceptionExample.missingCheckOnIndex(codetoanalyze.java.tracing.T2[],int), 6, java.lang.ArrayIndexOutOfBoundsException, [start of procedure missingCheckOnIndex(...),Taking true branch,Taking true branch,Taking true branch,start of procedure callMethodFromArray(...),Taking true branch,exception java.lang.ArrayIndexOutOfBoundsException,return from a call to void ArrayIndexOutOfBoundsExceptionExample.callMethodFromArray(codetoanalyze.java.tracing.T2[],int),exception java.lang.ArrayIndexOutOfBoundsException,return from a call to void ArrayIndexOutOfBoundsExceptionExample.missingCheckOnIndex(codetoanalyze.java.tracing.T2[],int)] diff --git a/infer/tests/codetoanalyze/objc/errors/issues.exp b/infer/tests/codetoanalyze/objc/errors/issues.exp index b1dbf435c..4b938543e 100644 --- a/infer/tests/codetoanalyze/objc/errors/issues.exp +++ b/infer/tests/codetoanalyze/objc/errors/issues.exp @@ -24,7 +24,6 @@ codetoanalyze/objc/shared/assertions/NSAssert_example.m, NSAssert_addTarget:, 1, codetoanalyze/objc/shared/assertions/NSAssert_example.m, NSAssert_initWithRequest:, 1, MEMORY_LEAK, [start of procedure initWithRequest:,Condition is false,Condition is true,Condition is true] codetoanalyze/objc/shared/assertions/NSAssert_example.m, test1, 1, MEMORY_LEAK, [start of procedure test1(),Condition is false,Condition is true,Condition is true,Condition is true] codetoanalyze/objc/shared/assertions/NSAssert_example.m, test1, 1, MEMORY_LEAK, [start of procedure test1(),Condition is false,Condition is true,Condition is true] -codetoanalyze/objc/shared/assertions/NSAssert_example.m, test2, 1, MEMORY_LEAK, [start of procedure test2(),Condition is false,Condition is true,Condition is true,Condition is true] codetoanalyze/objc/shared/assertions/NSAssert_example.m, test2, 1, MEMORY_LEAK, [start of procedure test2(),Condition is false,Condition is true,Condition is true] codetoanalyze/objc/shared/block/BlockVar.m, BlockVar_blockPostBad, 5, NULL_DEREFERENCE, [start of procedure blockPostBad,start of procedure block,return from a call to __objc_anonymous_block_BlockVar_blockPostBad______2] codetoanalyze/objc/shared/block/BlockVar.m, BlockVar_capturedNullDeref, 5, NULL_DEREFERENCE, [start of procedure capturedNullDeref,start of procedure block]