Summary:
Increases precision a bit. I didn't observe speed problems on what I tested. (But, who knows?)
Closes https://github.com/facebook/infer/pull/799
Reviewed By: jvillard
Differential Revision: D6284206
Pulled By: rgrig
fbshipit-source-id: 6f1e8631f
master
Radu Grigore6 years agocommitted byFacebook Github Bot
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNullableRet(boolean):void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefNullableRet(...),start of procedure nullableRet(...),Taking true branch,return from a call to Object NullPointerExceptions.nullableRet(boolean)]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNullableRet(boolean):void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefNullableRet(...),start of procedure nullableRet(...),Taking true branch,return from a call to Object NullPointerExceptions.nullableRet(boolean)]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRet():void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefUndefNullableRet(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRet():void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefUndefNullableRet(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRetWrapper():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefUndefNullableRetWrapper(),start of procedure undefNullableWrapper(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet(),return from a call to Object NullPointerExceptions.undefNullableWrapper()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRetWrapper():void, 1, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure derefUndefNullableRetWrapper(),start of procedure undefNullableWrapper(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet(),return from a call to Object NullPointerExceptions.undefNullableWrapper()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterLoopOnList(codetoanalyze.java.infer.NullPointerExceptions$L):void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure dereferenceAfterLoopOnList(...),start of procedure returnsNullAfterLoopOnList(...),Taking true branch,Taking true branch,Taking false branch,return from a call to Object NullPointerExceptions.returnsNullAfterLoopOnList(NullPointerExceptions$L)]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterLoopOnList(codetoanalyze.java.infer.NullPointerExceptions$L):void, 2, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure dereferenceAfterLoopOnList(...),start of procedure returnsNullAfterLoopOnList(...),Taking true branch,Taking false branch,return from a call to Object NullPointerExceptions.returnsNullAfterLoopOnList(NullPointerExceptions$L)]
codetoanalyze/c/biabduction/abduce.c, FN_set_ptr_param_array_get_null_bad, 3, PRECONDITION_NOT_MET, no_bucket, WARNING, [start of procedure FN_set_ptr_param_array_get_null_bad()]
codetoanalyze/c/biabduction/abduce.c, FN_set_ptr_param_array_get_null_bad, 3, PRECONDITION_NOT_MET, no_bucket, WARNING, [start of procedure FN_set_ptr_param_array_get_null_bad()]
codetoanalyze/c/biabduction/arrays.c, DecodeCurrentValue, 5, Assert_failure, no_bucket, ERROR, [start of procedure DecodeCurrentValue(),start of procedure GetVarint64Ptr(),Loop condition is true. Entering loop body,Loop condition is true. Entering loop body,Taking true branch,return from a call to GetVarint64Ptr,Loop condition is false. Leaving loop,start of procedure GetVarint64Ptr(),Loop condition is true. Entering loop body,Loop condition is false. Leaving loop,return from a call to GetVarint64Ptr]
codetoanalyze/c/biabduction/example.c, bar, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure bar()]
codetoanalyze/c/biabduction/example.c, bar, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure bar()]
codetoanalyze/c/biabduction/example.c, foo, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure foo()]
codetoanalyze/c/biabduction/example.c, foo, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure foo()]
codetoanalyze/java/infer/Lists.java, codetoanalyze.java.infer.Lists.getElementNPE(java.util.List):void, 4, NULL_DEREFERENCE, B2, ERROR, [start of procedure getElementNPE(...),Taking false branch,start of procedure getElement(...),Taking true branch,return from a call to Object Lists.getElement(List)]
codetoanalyze/java/infer/Lists.java, codetoanalyze.java.infer.Lists.getElementNPE(java.util.List):void, 4, NULL_DEREFERENCE, B2, ERROR, [start of procedure getElementNPE(...),Taking false branch,start of procedure getElement(...),Taking true branch,return from a call to Object Lists.getElement(List)]
codetoanalyze/java/infer/NopFun.java, T.go():void, 4, PRECONDITION_NOT_MET, no_bucket, WARNING, [start of procedure go(),start of procedure f(),Taking true branch,return from a call to void T.f(),start of procedure h(),Taking true branch,return from a call to void T.h()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions$$$Class$Name$With$Dollars.npeWithDollars():void, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure npeWithDollars()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions$$$Class$Name$With$Dollars.npeWithDollars():void, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure npeWithDollars()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions$E.dereferenceNullableInterfaceFieldBad():void, 1, NULL_DEREFERENCE, B1, ERROR, [start of procedure dereferenceNullableInterfaceFieldBad()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions$E.dereferenceNullableInterfaceFieldBad():void, 1, NULL_DEREFERENCE, B1, ERROR, [start of procedure dereferenceNullableInterfaceFieldBad()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.FP_noNullPointerExceptionAfterSkipFunction():void, 4, NULL_DEREFERENCE, B5, ERROR, [start of procedure FP_noNullPointerExceptionAfterSkipFunction(),Skipping String(...): unknown method,Skipping toString(): unknown method,start of procedure genericMethodSomewhereCheckingForNull(...),Taking true branch,return from a call to void NullPointerExceptions.genericMethodSomewhereCheckingForNull(String)]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.FP_noNullPointerExceptionAfterSkipFunction():void, 4, NULL_DEREFERENCE, B5, ERROR, [start of procedure FP_noNullPointerExceptionAfterSkipFunction(),Skipping String(...): unknown method,Skipping toString(): unknown method,start of procedure genericMethodSomewhereCheckingForNull(...),Taking true branch,return from a call to void NullPointerExceptions.genericMethodSomewhereCheckingForNull(String)]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNullableRet(boolean):void, 2, NULL_DEREFERENCE, B2, ERROR, [start of procedure derefNullableRet(...),start of procedure nullableRet(...),Taking true branch,return from a call to Object NullPointerExceptions.nullableRet(boolean)]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefNullableRet(boolean):void, 2, NULL_DEREFERENCE, B2, ERROR, [start of procedure derefNullableRet(...),start of procedure nullableRet(...),Taking true branch,return from a call to Object NullPointerExceptions.nullableRet(boolean)]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRet():void, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure derefUndefNullableRet(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRet():void, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure derefUndefNullableRet(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRetWrapper():void, 1, NULL_DEREFERENCE, B1, ERROR, [start of procedure derefUndefNullableRetWrapper(),start of procedure undefNullableWrapper(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet(),return from a call to Object NullPointerExceptions.undefNullableWrapper()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.derefUndefNullableRetWrapper():void, 1, NULL_DEREFERENCE, B1, ERROR, [start of procedure derefUndefNullableRetWrapper(),start of procedure undefNullableWrapper(),Skipping undefNullableRet(): unknown method,Definition of undefNullableRet(),return from a call to Object NullPointerExceptions.undefNullableWrapper()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterLoopOnList(codetoanalyze.java.infer.NullPointerExceptions$L):void, 2, NULL_DEREFERENCE, B2, ERROR, [start of procedure dereferenceAfterLoopOnList(...),start of procedure returnsNullAfterLoopOnList(...),Taking true branch,Taking true branch,Taking false branch,return from a call to Object NullPointerExceptions.returnsNullAfterLoopOnList(NullPointerExceptions$L)]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions.dereferenceAfterLoopOnList(codetoanalyze.java.infer.NullPointerExceptions$L):void, 2, NULL_DEREFERENCE, B2, ERROR, [start of procedure dereferenceAfterLoopOnList(...),start of procedure returnsNullAfterLoopOnList(...),Taking true branch,Taking false branch,return from a call to Object NullPointerExceptions.returnsNullAfterLoopOnList(NullPointerExceptions$L)]
codetoanalyze/java/infer/ArrayOutOfBounds.java, codetoanalyze.java.infer.ArrayOutOfBounds.arrayOutOfBounds():int, 2, java.lang.ArrayIndexOutOfBoundsException, no_bucket, ERROR, [start of procedure arrayOutOfBounds(),Taking true branch,exception java.lang.ArrayIndexOutOfBoundsException,return from a call to int ArrayOutOfBounds.arrayOutOfBounds()]
codetoanalyze/java/infer/ArrayOutOfBounds.java, codetoanalyze.java.infer.ArrayOutOfBounds.arrayOutOfBounds():int, 2, java.lang.ArrayIndexOutOfBoundsException, no_bucket, ERROR, [start of procedure arrayOutOfBounds(),Taking true branch,exception java.lang.ArrayIndexOutOfBoundsException,return from a call to int ArrayOutOfBounds.arrayOutOfBounds()]
codetoanalyze/java/infer/ArrayOutOfBounds.java, codetoanalyze.java.infer.ArrayOutOfBounds.switchedArrsOutOfBounds():void, 2, java.lang.ArrayIndexOutOfBoundsException, no_bucket, ERROR, [start of procedure switchedArrsOutOfBounds(),start of procedure buggyIter(...),Taking true branch,Taking false branch,return from a call to void ArrayOutOfBounds.buggyIter(int[],int[]),return from a call to void ArrayOutOfBounds.switchedArrsOutOfBounds()]
codetoanalyze/java/infer/ArrayOutOfBounds.java, codetoanalyze.java.infer.ArrayOutOfBounds.switchedArrsOutOfBounds():void, 2, java.lang.ArrayIndexOutOfBoundsException, no_bucket, ERROR, [start of procedure switchedArrsOutOfBounds(),start of procedure buggyIter(...),Taking true branch,Taking true branch,Taking true branch,Taking true branch,Taking true branch,Taking true branch,Taking true branch,Taking true branch,Taking true branch,Taking false branch,return from a call to void ArrayOutOfBounds.buggyIter(int[],int[]),return from a call to void ArrayOutOfBounds.switchedArrsOutOfBounds()]
codetoanalyze/java/infer/ClassCastExceptions.java, codetoanalyze.java.infer.ClassCastExceptions.classCastException():void, 3, java.lang.ClassCastException, no_bucket, ERROR, [start of procedure classCastException(),start of procedure SubClassA(),start of procedure SuperClass(),return from a call to SuperClass.<init>(),return from a call to SubClassA.<init>(),Skipping ClassCastException(): unknown method,exception java.lang.ClassCastException,return from a call to void ClassCastExceptions.classCastException()]
codetoanalyze/java/infer/ClassCastExceptions.java, codetoanalyze.java.infer.ClassCastExceptions.classCastException():void, 3, java.lang.ClassCastException, no_bucket, ERROR, [start of procedure classCastException(),start of procedure SubClassA(),start of procedure SuperClass(),return from a call to SuperClass.<init>(),return from a call to SubClassA.<init>(),Skipping ClassCastException(): unknown method,exception java.lang.ClassCastException,return from a call to void ClassCastExceptions.classCastException()]
codetoanalyze/java/infer/ClassCastExceptions.java, codetoanalyze.java.infer.ClassCastExceptions.classCastExceptionImplementsInterface():int, 0, java.lang.ClassCastException, no_bucket, ERROR, [start of procedure classCastExceptionImplementsInterface(),start of procedure AnotherImplementationOfInterface(),return from a call to AnotherImplementationOfInterface.<init>(),start of procedure classCastExceptionImplementsInterfaceCallee(...),Skipping ClassCastException(): unknown method,exception java.lang.ClassCastException,return from a call to int ClassCastExceptions.classCastExceptionImplementsInterfaceCallee(AnotherImplementationOfInterface),exception java.lang.ClassCastException,return from a call to int ClassCastExceptions.classCastExceptionImplementsInterface()]
codetoanalyze/java/infer/ClassCastExceptions.java, codetoanalyze.java.infer.ClassCastExceptions.classCastExceptionImplementsInterface():int, 0, java.lang.ClassCastException, no_bucket, ERROR, [start of procedure classCastExceptionImplementsInterface(),start of procedure AnotherImplementationOfInterface(),return from a call to AnotherImplementationOfInterface.<init>(),start of procedure classCastExceptionImplementsInterfaceCallee(...),Skipping ClassCastException(): unknown method,exception java.lang.ClassCastException,return from a call to int ClassCastExceptions.classCastExceptionImplementsInterfaceCallee(AnotherImplementationOfInterface),exception java.lang.ClassCastException,return from a call to int ClassCastExceptions.classCastExceptionImplementsInterface()]
codetoanalyze/java/infer/NullPointerExceptions.java, codetoanalyze.java.infer.NullPointerExceptions$$$Class$Name$With$Dollars.npeWithDollars():void, 3, java.lang.NullPointerException, no_bucket, ERROR, [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, codetoanalyze.java.infer.NullPointerExceptions$$$Class$Name$With$Dollars.npeWithDollars():void, 3, java.lang.NullPointerException, no_bucket, ERROR, [start of procedure npeWithDollars(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions$$$Class$Name$With$Dollars.npeWithDollars()]