Skip to content
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

Improve support of static initialization blocks and statically-reachable memory #389

Closed
eupp opened this issue Sep 25, 2024 · 4 comments
Closed

Comments

@eupp
Copy link
Collaborator

eupp commented Sep 25, 2024

Currently, if a Lincheck test execution both:

  • reads some values from statically-reachable memory, and
  • modifies the content of the same memory during the test

it can lead to non-determinism error (the Lincheck would not be able to replay the execution trace, because the content of the static memory changed).

[Above by statically-reachable memory we mean any mutable state reachable from static variables.]

Note that during the test statically-reachable memory can be modified both by

  • static initialization blocks (<clinit>),
  • and the regular functions from the test.

Thus, in order to fix possible non-determinism errors, we need to track modifications performed by <clinit> blocks, save them into trace, and manually re-perform them during replay (in the same order as in the original execution).

@dmitrii-artuhov
Copy link
Collaborator

dmitrii-artuhov commented Nov 27, 2024

Todo list for proper support of the static memory restoring:

@eupp
Copy link
Collaborator Author

eupp commented Feb 6, 2025

Removed the subtask

  • referencing fields and modifiying their values via reflection

as it is not specific to static memory restoring logic, and is out of scope

@ndkoval
Copy link
Collaborator

ndkoval commented Feb 7, 2025

@dmitrii-artuhov let's for now ignore tests that fail on recent JVMs and fix them later

@ndkoval ndkoval added this to the GPMC: Beta milestone Feb 13, 2025
@eupp
Copy link
Collaborator Author

eupp commented Mar 3, 2025

I've added separate issue #554 for arraycopy support, and closing this one.

@eupp eupp closed this as completed Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants