Summary:
In Java, static variables are distinguished by package/class:
the file where they are defined doesn't matter.
Fixes#831.
Closes https://github.com/facebook/infer/pull/833
Reviewed By: jeremydubreil
Differential Revision: D6661240
Pulled By: sblackshear
fbshipit-source-id: beeb2f9
master
Radu Grigore7 years agocommitted byFacebook Github Bot
codetoanalyze/cpp/siof/siof/duplicate_reports.cpp, __infer_globals_initializer_many_paths_to_siof_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of many_paths_to_siof_bad,call to X_X,call to access_rick,access to rick|EXTERN]
codetoanalyze/cpp/siof/siof/duplicate_reports.cpp, __infer_globals_initializer_many_paths_to_siof_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of many_paths_to_siof_bad,call to X_X,call to nested_access,access to dangerous|EXTERN]
codetoanalyze/cpp/siof/siof/duplicate_reports.cpp, __infer_globals_initializer_many_paths_to_siof_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of many_paths_to_siof_bad,call to X_X,call to access_rick,access to rick|]
codetoanalyze/cpp/siof/siof/duplicate_reports.cpp, __infer_globals_initializer_many_paths_to_siof_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of many_paths_to_siof_bad,call to X_X,call to nested_access,access to dangerous|]
codetoanalyze/cpp/siof/siof/siof.cpp, __infer_globals_initializer_X::static_pod_accesses_non_pod_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of X::static_pod_accesses_non_pod_bad,call to access_to_non_pod,access to global_object2|codetoanalyze/cpp/siof/siof/siof_different_tu.cpp]
codetoanalyze/cpp/siof/siof/siof.cpp, __infer_globals_initializer_X::static_pod_accesses_non_pod_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of X::static_pod_accesses_non_pod_bad,call to access_to_non_pod,access to some_other_global_object2|codetoanalyze/cpp/siof/siof/siof_different_tu.cpp]
codetoanalyze/cpp/siof/siof/siof.cpp, __infer_globals_initializer_another_global_object2_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of another_global_object2_bad,call to access_to_non_pod,access to global_object2|codetoanalyze/cpp/siof/siof/siof_different_tu.cpp]
codetoanalyze/cpp/siof/siof/siof.cpp, __infer_globals_initializer_another_global_object2_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of another_global_object2_bad,call to access_to_non_pod,access to some_other_global_object2|codetoanalyze/cpp/siof/siof/siof_different_tu.cpp]
codetoanalyze/cpp/siof/siof/siof.cpp, __infer_globals_initializer_another_global_object3_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of another_global_object3_bad,call to access_to_templated_non_pod,access to global_object3|codetoanalyze/cpp/siof/siof/siof_different_tu.cpp]
codetoanalyze/cpp/siof/siof/siof.cpp, __infer_globals_initializer_another_global_object_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of another_global_object_bad,call to SomeOtherNonPODObject_SomeOtherNonPODObject,access to extern_global_object|EXTERN]
codetoanalyze/cpp/siof/siof/siof.cpp, __infer_globals_initializer_another_global_object_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of another_global_object_bad,call to SomeOtherNonPODObject_SomeOtherNonPODObject,access to extern_global_object|]
codetoanalyze/cpp/siof/siof/siof.cpp, __infer_globals_initializer_initWithGlobal_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of initWithGlobal_bad,call to getGlobalNonPOD,access to global_object2|codetoanalyze/cpp/siof/siof/siof_different_tu.cpp]
codetoanalyze/cpp/siof/siof/siof.cpp, __infer_globals_initializer_initWithGlobal_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of initWithGlobal_bad,call to getGlobalNonPOD,access to some_other_global_object2|codetoanalyze/cpp/siof/siof/siof_different_tu.cpp]
codetoanalyze/cpp/siof/siof/siof.cpp, __infer_globals_initializer_pod_accesses_non_pod_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of pod_accesses_non_pod_bad,call to access_to_non_pod,access to global_object2|codetoanalyze/cpp/siof/siof/siof_different_tu.cpp]
codetoanalyze/cpp/siof/siof/siof_templated.cpp, __infer_globals_initializer_another_templated_global_object2_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of another_templated_global_object2_bad,call to access_to_non_pod,access to global_object2|codetoanalyze/cpp/siof/siof/siof_different_tu.cpp]
codetoanalyze/cpp/siof/siof/siof_templated.cpp, __infer_globals_initializer_another_templated_global_object2_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of another_templated_global_object2_bad,call to access_to_non_pod,access to some_other_global_object2|codetoanalyze/cpp/siof/siof/siof_different_tu.cpp]
codetoanalyze/cpp/siof/siof/siof_templated.cpp, __infer_globals_initializer_another_templated_global_object3_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of another_templated_global_object3_bad,call to access_to_templated_non_pod,access to global_object3|codetoanalyze/cpp/siof/siof/siof_different_tu.cpp]
codetoanalyze/cpp/siof/siof/siof_templated.cpp, __infer_globals_initializer_another_templated_global_object_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of another_templated_global_object_bad,call to SomeOtherTemplatedNonPODObject<_Bool>_SomeOtherTemplatedNonPODObject,access to extern_global_object|EXTERN]
codetoanalyze/cpp/siof/siof/std_ios_base_init.cpp, __infer_globals_initializer_global_std_cerr_access_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of global_std_cerr_access_bad,call to return_4_SIOF,call to printing_SIOF,access to std::cerr|EXTERN]
codetoanalyze/cpp/siof/siof/siof_templated.cpp, __infer_globals_initializer_another_templated_global_object_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of another_templated_global_object_bad,call to SomeOtherTemplatedNonPODObject<_Bool>_SomeOtherTemplatedNonPODObject,access to extern_global_object|]
codetoanalyze/cpp/siof/siof/std_ios_base_init.cpp, __infer_globals_initializer_global_std_cerr_access_bad, 0, STATIC_INITIALIZATION_ORDER_FIASCO, [initialization of global_std_cerr_access_bad,call to return_4_SIOF,call to printing_SIOF,access to std::cerr|]
codetoanalyze/java/quandary/Interprocedural.java, void Interprocedural.returnSourceDirectViaVarBad(), 2, QUANDARY_TAINT_ERROR, [Return from Object InferTaint.inferSecretSource() with tainted data &return*,Return from Object Interprocedural.returnSourceDirect(),Call to void InferTaint.inferSensitiveSink(Object) with tainted index 0]
codetoanalyze/java/quandary/Interprocedural.java, void Interprocedural.returnSourceIndirectBad(), 1, QUANDARY_TAINT_ERROR, [Return from Object InferTaint.inferSecretSource() with tainted data &return*,Return from Object Interprocedural.returnSourceDirect() with tainted data &return*,Return from Object Interprocedural.returnSourceIndirect(),Call to void InferTaint.inferSensitiveSink(Object) with tainted index 0]
codetoanalyze/java/quandary/Interprocedural.java, void Interprocedural.returnSourceViaFieldBad(), 1, QUANDARY_TAINT_ERROR, [Return from Object InferTaint.inferSecretSource() with tainted data &return.codetoanalyze.java.quandary.Interprocedural$Obj.f*,Return from Interprocedural$Obj Interprocedural.returnSourceViaField(),Call to void InferTaint.inferSensitiveSink(Object) with tainted index 0]
codetoanalyze/java/quandary/Interprocedural.java, void Interprocedural.returnSourceViaGlobalBad(), 2, QUANDARY_TAINT_ERROR, [Return from Object InferTaint.inferSecretSource() with tainted data &#GB<codetoanalyze/java/quandary/Interprocedural.java>$codetoanalyze.java.quandary.Interprocedural.codetoanalyze.java.quandary.Interprocedural.sGlobal*,Return from void Interprocedural.returnSourceViaGlobal(),Call to void InferTaint.inferSensitiveSink(Object) with tainted index 0]
codetoanalyze/java/quandary/Interprocedural.java, void Interprocedural.returnSourceViaGlobalBad(), 2, QUANDARY_TAINT_ERROR, [Return from Object InferTaint.inferSecretSource() with tainted data &#GB<>$codetoanalyze.java.quandary.Interprocedural.codetoanalyze.java.quandary.Interprocedural.sGlobal*,Return from void Interprocedural.returnSourceViaGlobal(),Call to void InferTaint.inferSensitiveSink(Object) with tainted index 0]
codetoanalyze/java/quandary/Interprocedural.java, void Interprocedural.returnSourceViaParameter1Bad(Interprocedural$Obj), 2, QUANDARY_TAINT_ERROR, [Return from Object InferTaint.inferSecretSource() with tainted data @val$0.codetoanalyze.java.quandary.Interprocedural$Obj.f*,Return from void Interprocedural.returnSourceViaParameter1(Interprocedural$Obj),Call to void InferTaint.inferSensitiveSink(Object) with tainted index 0]
codetoanalyze/java/quandary/Interprocedural.java, void Interprocedural.returnSourceViaParameter2Bad(Interprocedural$Obj,Interprocedural$Obj), 3, QUANDARY_TAINT_ERROR, [Return from Object InferTaint.inferSecretSource(),Call to void InferTaint.inferSensitiveSink(Object) with tainted index 0]
codetoanalyze/java/quandary/Interprocedural.java, void Interprocedural.setGlobalThenCallSinkBad(), 2, QUANDARY_TAINT_ERROR, [Return from Object InferTaint.inferSecretSource(),Call to void Interprocedural.callSinkOnGlobal() with tainted index 0,Call to void InferTaint.inferSensitiveSink(Object) with tainted index 0]
codetoanalyze/java/racerd/Builders.java, Builders$Obj Builders.buildThenMutateBad(Builders$Obj), 3, THREAD_SAFETY_VIOLATION, [access to `&input.codetoanalyze.java.checkers.Builders$Obj.g`]
codetoanalyze/java/racerd/Builders.java, Builders$Obj Builders.mutateBad(Builders$Obj), 1, THREAD_SAFETY_VIOLATION, [access to `&o.codetoanalyze.java.checkers.Builders$Obj.g`]
codetoanalyze/java/racerd/Builders.java, void TopLevelBuilder.setG(String), 1, THREAD_SAFETY_VIOLATION, [access to `&this.codetoanalyze.java.checkers.TopLevelBuilder.g`]
codetoanalyze/java/racerd/Constructors.java, Constructors Constructors.FP_singleton2Ok(), 6, THREAD_SAFETY_VIOLATION, [<Read trace>,access to `&#GB<codetoanalyze/java/racerd/Constructors.java>$Constructors.Constructors.sSingleton1`,<Write trace>,access to `&#GB<codetoanalyze/java/racerd/Constructors.java>$Constructors.Constructors.sSingleton1`]
codetoanalyze/java/racerd/Constructors.java, Constructors Constructors.singleton1Bad(), 2, THREAD_SAFETY_VIOLATION, [call to Constructors.<init>(Object),access to `&#GB<codetoanalyze/java/racerd/Constructors.java>$Constructors.Constructors.staticField`]
codetoanalyze/java/racerd/Constructors.java, Constructors Constructors.singleton2Bad(), 1, THREAD_SAFETY_VIOLATION, [<Read trace>,access to `&#GB<codetoanalyze/java/racerd/Constructors.java>$Constructors.Constructors.sSingleton2`,<Write trace>,access to `&#GB<codetoanalyze/java/racerd/Constructors.java>$Constructors.Constructors.sSingleton2`]
codetoanalyze/java/racerd/Constructors.java, Constructors Constructors.singleton2Bad(), 2, THREAD_SAFETY_VIOLATION, [access to `&#GB<codetoanalyze/java/racerd/Constructors.java>$Constructors.Constructors.sSingleton2`]
codetoanalyze/java/racerd/Constructors.java, Constructors Constructors.singleton2Bad(), 4, THREAD_SAFETY_VIOLATION, [<Read trace>,access to `&#GB<codetoanalyze/java/racerd/Constructors.java>$Constructors.Constructors.sSingleton2`,<Write trace>,access to `&#GB<codetoanalyze/java/racerd/Constructors.java>$Constructors.Constructors.sSingleton2`]
codetoanalyze/java/racerd/Constructors.java, Constructors.<init>(), 1, THREAD_SAFETY_VIOLATION, [access to `&#GB<codetoanalyze/java/racerd/Constructors.java>$Constructors.Constructors.staticField`]
codetoanalyze/java/racerd/Constructors.java, Constructors Constructors.FP_singleton2Ok(), 6, THREAD_SAFETY_VIOLATION, [<Read trace>,access to `&#GB<>$Constructors.Constructors.sSingleton1`,<Write trace>,access to `&#GB<>$Constructors.Constructors.sSingleton1`]
codetoanalyze/java/racerd/Constructors.java, Constructors Constructors.singleton1Bad(), 2, THREAD_SAFETY_VIOLATION, [call to Constructors.<init>(Object),access to `&#GB<>$Constructors.Constructors.staticField`]
codetoanalyze/java/racerd/Constructors.java, Constructors Constructors.singleton2Bad(), 1, THREAD_SAFETY_VIOLATION, [<Read trace>,access to `&#GB<>$Constructors.Constructors.sSingleton2`,<Write trace>,access to `&#GB<>$Constructors.Constructors.sSingleton2`]
codetoanalyze/java/racerd/Constructors.java, Constructors Constructors.singleton2Bad(), 2, THREAD_SAFETY_VIOLATION, [access to `&#GB<>$Constructors.Constructors.sSingleton2`]
codetoanalyze/java/racerd/Constructors.java, Constructors Constructors.singleton2Bad(), 4, THREAD_SAFETY_VIOLATION, [<Read trace>,access to `&#GB<>$Constructors.Constructors.sSingleton2`,<Write trace>,access to `&#GB<>$Constructors.Constructors.sSingleton2`]
codetoanalyze/java/racerd/Constructors.java, Constructors.<init>(), 1, THREAD_SAFETY_VIOLATION, [access to `&#GB<>$Constructors.Constructors.staticField`]
codetoanalyze/java/racerd/Constructors.java, Constructors.<init>(Constructors), 1, THREAD_SAFETY_VIOLATION, [access to `&o.Constructors.field`]
codetoanalyze/java/racerd/Containers.java, boolean Containers.listReadBad(String), 1, THREAD_SAFETY_VIOLATION, [<Read trace>,Read of container `&this.codetoanalyze.java.checkers.Containers.mList` via call to `contains`,<Write trace>,Write to container `&this.codetoanalyze.java.checkers.Containers.mList` via call to `set`]
codetoanalyze/java/racerd/Containers.java, int Containers.readSimpleArrayMap(), 1, THREAD_SAFETY_VIOLATION, [<Read trace>,Read of container `&this.codetoanalyze.java.checkers.Containers.si_map` via call to `get`,<Write trace>,Write to container `&this.codetoanalyze.java.checkers.Containers.si_map` via call to `put`]
codetoanalyze/java/racerd/Containers.java, void Containers.mapRemoveBad(String), 1, THREAD_SAFETY_VIOLATION, [Write to container `&this.codetoanalyze.java.checkers.Containers.mMap` via call to `remove`]
codetoanalyze/java/racerd/Containers.java, void Containers.mapSubclassWriteBad(HashMap,String), 1, THREAD_SAFETY_VIOLATION, [Write to container `&m` via call to `remove`]
codetoanalyze/java/racerd/Containers.java, void Containers.poolBad(), 5, THREAD_SAFETY_VIOLATION, [Write to container `&this.codetoanalyze.java.checkers.Containers.simplePool` via call to `release`]
codetoanalyze/java/racerd/DeepOwnership.java, void DeepOwnership.globalNotOwnedBad(), 1, THREAD_SAFETY_VIOLATION, [access to `&#GB<codetoanalyze/java/racerd/DeepOwnership.java>$DeepOwnership.DeepOwnership.global.DeepOwnership.next`]
codetoanalyze/java/racerd/DeepOwnership.java, void DeepOwnership.globalNotOwnedBad(), 1, THREAD_SAFETY_VIOLATION, [access to `&#GB<>$DeepOwnership.DeepOwnership.global.DeepOwnership.next`]
codetoanalyze/java/racerd/DeepOwnership.java, void DeepOwnership.reassignBaseToGlobalBad(), 3, THREAD_SAFETY_VIOLATION, [access to `&x.DeepOwnership.next`]
codetoanalyze/java/racerd/Locks.java, void Locks.tryLockNoCheckBad(), 2, THREAD_SAFETY_VIOLATION, [access to `&this.codetoanalyze.java.checkers.Locks.f`]
codetoanalyze/java/racerd/Locks.java, void Locks.tryLockWrongBranchBad(), 3, THREAD_SAFETY_VIOLATION, [access to `&this.codetoanalyze.java.checkers.Locks.f`]
codetoanalyze/java/racerd/Ownership.java, Ownership.<init>(Obj,Object), 1, THREAD_SAFETY_VIOLATION, [access to `&obj.codetoanalyze.java.checkers.Obj.f`]
codetoanalyze/java/racerd/Ownership.java, int Ownership.readGlobalBad(), 1, THREAD_SAFETY_VIOLATION, [<Read trace>,access to `&#GB<codetoanalyze/java/racerd/Ownership.java>$codetoanalyze.java.checkers.Ownership.codetoanalyze.java.checkers.Ownership.global`,<Write trace>,access to `&#GB<codetoanalyze/java/racerd/Ownership.java>$codetoanalyze.java.checkers.Ownership.codetoanalyze.java.checkers.Ownership.global`]
codetoanalyze/java/racerd/Ownership.java, int Ownership.readGlobalBad(), 1, THREAD_SAFETY_VIOLATION, [<Read trace>,access to `&#GB<>$codetoanalyze.java.checkers.Ownership.codetoanalyze.java.checkers.Ownership.global`,<Write trace>,access to `&#GB<>$codetoanalyze.java.checkers.Ownership.codetoanalyze.java.checkers.Ownership.global`]
codetoanalyze/java/racerd/Ownership.java, void Ownership.cantOwnThisBad(), 1, THREAD_SAFETY_VIOLATION, [call to void Ownership.setField(Obj),access to `&this.codetoanalyze.java.checkers.Ownership.field`]
codetoanalyze/java/racerd/Ownership.java, void Ownership.castThenCallBad(), 2, THREAD_SAFETY_VIOLATION, [call to void Ownership.castThenCall(Obj),call to void Subclass.doWrite(),access to `&this.codetoanalyze.java.checkers.Obj.f`]
codetoanalyze/java/racerd/Ownership.java, void Ownership.castThenReturnBad(), 2, THREAD_SAFETY_VIOLATION, [access to `n$5.codetoanalyze.java.checkers.Obj.f`]