Summary:
Use same code for deciding whether two accesses conflict across java/clang, by adapting that of the clang version.
Eliminate/simplify some code.
Reviewed By: mbouaziz, jberdine
Differential Revision: D10217383
fbshipit-source-id: dc0986d05
master
Nikos Gorogiannis6 years agocommitted byFacebook Github Bot
codetoanalyze/java/racerd/Constructors.java, Constructors.singleton2Bad():Constructors, 63, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [<Read trace>,access to `Constructors.Constructors.sSingleton2`,<Write trace>,access to `Constructors.Constructors.sSingleton2`]
codetoanalyze/java/racerd/Constructors.java, Constructors.singleton2Bad():Constructors, 63, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [<Read trace>,access to `Constructors.Constructors.sSingleton2`,<Write trace>,access to `Constructors.Constructors.sSingleton2`]
codetoanalyze/java/racerd/Constructors.java, Constructors.singleton2Bad():Constructors, 64, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [access to `Constructors.Constructors.sSingleton2`]
codetoanalyze/java/racerd/Constructors.java, Constructors.singleton2Bad():Constructors, 64, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [access to `Constructors.Constructors.sSingleton2`]
codetoanalyze/java/racerd/Constructors.java, Constructors.singleton2Bad():Constructors, 66, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [<Read trace>,access to `Constructors.Constructors.sSingleton2`,<Write trace>,access to `Constructors.Constructors.sSingleton2`]
codetoanalyze/java/racerd/Constructors.java, Constructors.singleton2Bad():Constructors, 66, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [<Read trace>,access to `Constructors.Constructors.sSingleton2`,<Write trace>,access to `Constructors.Constructors.sSingleton2`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.addToSimpleArrayMapBad(android.support.v4.util.SimpleArrayMap):void, 273, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `map` via call to `put`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.addToSimpleArrayMapBad(android.support.v4.util.SimpleArrayMap):void, 279, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `map` via call to `put`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.addToSparseArrayBad(android.util.SparseArray):void, 263, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `sparseArray` via call to `put`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.addToSparseArrayBad(android.util.SparseArray):void, 269, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `sparseArray` via call to `put`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.addToSparseArrayCompatBad(android.support.v4.util.SparseArrayCompat):void, 254, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `sparseArray` via call to `put`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.addToSparseArrayCompatBad(android.support.v4.util.SparseArrayCompat):void, 260, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `sparseArray` via call to `put`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.containerWrapperUnownedWriteBad(java.lang.Object):void, 161, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [call to Object ContainerWrapper.write(Object),call to Object ContainerWrapper._write(Object),Write to container `this.codetoanalyze.java.checkers.ContainerWrapper.children` via call to `add`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.containerWrapperUnownedWriteBad(java.lang.Object):void, 167, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [call to Object ContainerWrapper.write(Object),call to Object ContainerWrapper._write(Object),Write to container `this.codetoanalyze.java.checkers.ContainerWrapper.children` via call to `add`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listAddAllBad(java.util.Collection):void, 55, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `addAll`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listAddAllBad(java.util.Collection):void, 55, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `addAll`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listAddBad1(java.lang.String):void, 47, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `add`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listAddBad1(java.lang.String):void, 47, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `add`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listAddBad2(int,java.lang.String):void, 51, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `add`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listAddBad2(int,java.lang.String):void, 51, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `add`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listClearBad():void, 59, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `clear`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listClearBad():void, 59, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `clear`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listReadBad(java.lang.String):boolean, 92, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [<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, codetoanalyze.java.checkers.Containers.listReadBad(java.lang.String):boolean, 98, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [<Read trace>,Read of container `this.codetoanalyze.java.checkers.Containers.mListSyncWrites` via call to `contains`,<Write trace>,Write to container `this.codetoanalyze.java.checkers.Containers.mListSyncWrites` via call to `add`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listRemoveBad1(int):void, 63, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `remove`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listRemoveBad1(int):void, 63, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `remove`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listRemoveBad2(java.lang.String):void, 67, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `remove`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listRemoveBad2(java.lang.String):void, 67, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `remove`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listSetBad(int,java.lang.String):void, 75, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `set`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listSetBad(int,java.lang.String):void, 75, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mList` via call to `set`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listSubclassWriteBad(java.util.ArrayList,int):void, 79, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `list` via call to `remove`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.listSubclassWriteBad(java.util.ArrayList,int):void, 79, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `list` via call to `remove`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.mapClearBad():void, 109, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mMap` via call to `clear`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.mapClearBad():void, 115, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mMap` via call to `clear`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.mapPutAllBad(java.util.Map):void, 113, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mMap` via call to `putAll`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.mapPutAllBad(java.util.Map):void, 119, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mMap` via call to `putAll`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.mapPutBad(java.lang.String,java.lang.String):void, 101, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mMap` via call to `put`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.mapPutBad(java.lang.String,java.lang.String):void, 107, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mMap` via call to `put`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.mapRemoveBad(java.lang.String):void, 105, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mMap` via call to `remove`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.mapRemoveBad(java.lang.String):void, 111, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.mMap` via call to `remove`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.mapSubclassWriteBad(java.util.HashMap,java.lang.String):void, 131, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `m` via call to `remove`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.mapSubclassWriteBad(java.util.HashMap,java.lang.String):void, 137, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `m` via call to `remove`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.poolBad():void, 292, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.simplePool` via call to `release`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.poolBad():void, 298, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [Write to container `this.codetoanalyze.java.checkers.Containers.simplePool` via call to `release`]
codetoanalyze/java/racerd/Containers.java, codetoanalyze.java.checkers.Containers.readSimpleArrayMap():int, 278, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [<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, codetoanalyze.java.checkers.Containers.readSimpleArrayMap():int, 284, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [<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/DeepOwnership.java, DeepOwnership.globalNotOwnedBad():void, 16, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [access to `DeepOwnership.DeepOwnership.global.DeepOwnership.next`]
codetoanalyze/java/racerd/DeepOwnership.java, DeepOwnership.globalNotOwnedBad():void, 16, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [access to `DeepOwnership.DeepOwnership.global.DeepOwnership.next`]
codetoanalyze/java/racerd/DeepOwnership.java, DeepOwnership.reassignBaseToGlobalBad():void, 22, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [access to `x.DeepOwnership.next`]
codetoanalyze/java/racerd/DeepOwnership.java, DeepOwnership.reassignBaseToGlobalBad():void, 22, THREAD_SAFETY_VIOLATION, no_bucket, ERROR, [access to `x.DeepOwnership.next`]