[tests] Add test for suboptimal join of attributes

Summary:
Add a test case for a problem peterogithub uncovered with join of
attributes.  The expected result is currently incorrect, to be fixed
later.

Reviewed By: sblackshear

Differential Revision: D3970363

fbshipit-source-id: 077705d
master
Josh Berdine 8 years ago committed by Facebook Github Bot
parent eb391d7875
commit 30541ec329

@ -11,16 +11,16 @@ ANALYZER = checkers
FILES = \
Branch.java \
FragmentRetainsViewExample.java \
ExpensiveCallExample.java \
ImmutableCast.java \
ExpensiveInheritanceExample.java \
NoAllocationExample.java \
ExpensiveInterfaceExample.java \
PrintfArgsChecker.java \
ExpensiveSubtypingExample.java \
TraceCallSequence.java \
FragmentDoesNotRetainViewExample.java \
FragmentRetainsViewExample.java \
ImmutableCast.java \
NoAllocationExample.java \
PrintfArgsChecker.java \
TraceCallSequence.java \
TwoCheckersExample.java
compile:

@ -354,4 +354,20 @@ public class GuardedByExample {
}
*/
int n;
public void FP_withloop2() {
synchronized (mLock) {
for (int i = 0; i<=n; i++) {
f = 42;
}
}
}
public void withoutloop2() {
synchronized (mLock) {
f = 42;
}
}
}

@ -74,6 +74,7 @@ FilterOutputStreamLeaks.java, void FilterOutputStreamLeaks.printStreamNotClosedA
GuardedByExample.java, Object GuardedByExample.byRefTrickyBad(), 5, UNSAFE_GUARDED_BY_ACCESS
GuardedByExample.java, String GuardedByExample$3.readFromInnerClassBad1(), 2, UNSAFE_GUARDED_BY_ACCESS
GuardedByExample.java, String GuardedByExample$4.readFromInnerClassBad2(), 1, UNSAFE_GUARDED_BY_ACCESS
GuardedByExample.java, void GuardedByExample.FP_withloop2(), 3, UNSAFE_GUARDED_BY_ACCESS
GuardedByExample.java, void GuardedByExample.readFAfterBlockBad(), 3, UNSAFE_GUARDED_BY_ACCESS
GuardedByExample.java, void GuardedByExample.readFBad(), 1, UNSAFE_GUARDED_BY_ACCESS
GuardedByExample.java, void GuardedByExample.readFBadWrongAnnotation(), 1, UNSAFE_GUARDED_BY_ACCESS

Loading…
Cancel
Save