-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New model checker algorithm #410
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
* fix monitor tests * fix parking tests (use Unsafe for reflective memory locations read/writes) * fix few bugs by adding `runInIgnoredSection` Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
* fix `patchResultsClock` function * remove redundant `AtomicLongTest` * fix delta in managed strategy handler of `getAndIncrement()` and similar methods * remove obsolete code from EventStructureMemoryTracker * perform physical write to memory on successful CAS Signed-off-by: Evgeniy Moiseenko <[email protected]>
* track constructor calls to track allocations of objects whose base classes are not instrumented Signed-off-by: Evgeniy Moiseenko <[email protected]>
* move `loopDetector.initialize()` into `ManagedStrategy.initializeInvocation` * comment debug byte-code printing Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
* fix `getFieldAccessMemoryLocation` (use actual runtime object's class name instead of compile-time access class name) * minor clean-up in MemoryTracker.kt Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
…entstruct-mc branch Signed-off-by: Evgeniy Moiseenko <[email protected]>
…ent type is unknown Signed-off-by: Evgeniy Moiseenko <[email protected]>
… new invocation and on new actor start) Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
* fix type computation for VarHandle accesses Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
* testing new model checking strategy * ensure that the object read from an intercepted read is transformed * repair primitives tests * repair `VarHandleLocalObjectsTest` Signed-off-by: Evgeniy Moiseenko <[email protected]>
* fix expected outcomes for `testLincheckPromptCancellation` Signed-off-by: Evgeniy Moiseenko <[email protected]>
… initialization) Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
… revisit this!) * decrease the number of loop iterations inside test's `operation()`, because currently large number of iterations triggers false-positive live-lock failure, due to naive implementation of spin-loops detection Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
* So, apparently, the `context` used in the `ParallelThreadsRunner::Completion` can somehow escape between different invocations of the test. If this happens, everything becomes really FUCKED UP, and I spent hours trying to debug it. It leads to a situation, when on the new run of the test, an old `ParallelThreadRunnerInterceptor` object (stored in the `context`) from the previous invocation is used instead. To fix the issue, I changed the `Completion::reset` logic. Instead of creating new interceptor object, I re-use the same object by reset its state. Since we only use completions in a very specific way in `ParallelThreadsRunner` (basically one separate completion object for each suspending actor) this should not, in theory, lead to any problem. Still, only Gods know if this is truly correct way to fix this. Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
Signed-off-by: Evgeniy Moiseenko <[email protected]>
@@ -250,13 +254,27 @@ public static void afterReflectiveSetter(Object receiver, Object value) { | |||
getEventTracker().afterReflectiveSetter(receiver, value); | |||
} | |||
|
|||
public static void onArrayCopy(Object srcArray, int srcPos, Object dstArray, int dstPos, int length) { | |||
getEventTracker().onArrayCopy(srcArray, srcPos, dstArray, dstPos, length); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment about System.arraycopy
boolean isStatic, boolean isFinal) { | ||
if (!isStatic && obj == null) return false; // Ignore, NullPointerException will be thrown | ||
return getEventTracker().beforeReadField(obj, className, fieldName, codeLocation, isStatic, isFinal); | ||
return getEventTracker().beforeReadField(obj, className, fieldName, typeDescriptor, codeLocation, isStatic, isFinal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-check if typeDescriptor
is required (find its usages).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if isPrimitive: Boolean
would be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Extract into separate PR.
Signed-off-by: Evgeniy Moiseenko <[email protected]>
boolean isStatic, boolean isFinal) { | ||
if (!isStatic && obj == null) return false; // Ignore, NullPointerException will be thrown | ||
return getEventTracker().beforeReadField(obj, className, fieldName, codeLocation, isStatic, isFinal); | ||
return getEventTracker().beforeReadField(obj, className, fieldName, typeDescriptor, codeLocation, isStatic, isFinal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if isPrimitive: Boolean
would be enough.
boolean isStatic, boolean isFinal) { | ||
if (!isStatic && obj == null) return false; // Ignore, NullPointerException will be thrown | ||
return getEventTracker().beforeReadField(obj, className, fieldName, codeLocation, isStatic, isFinal); | ||
return getEventTracker().beforeReadField(obj, className, fieldName, typeDescriptor, codeLocation, isStatic, isFinal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Extract into separate PR.
// flags to import Unsafe module; | ||
// it is used in some tests to check handling of unsafe APIs by Lincheck | ||
"--add-opens", "java.base/jdk.internal.misc=ALL-UNNAMED", | ||
"--add-exports", "java.base/jdk.internal.util=ALL-UNNAMED", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract Unsafe
tests into separate sub-project ?
No description provided.