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

Produce __VERIFIER_nondet_* harnesses for determistic replay #2

Open
sim642 opened this issue Nov 29, 2023 · 2 comments
Open

Produce __VERIFIER_nondet_* harnesses for determistic replay #2

sim642 opened this issue Nov 29, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@sim642
Copy link
Owner

sim642 commented Nov 29, 2023

No description provided.

@sim642 sim642 added the enhancement New feature or request label Nov 29, 2023
@rmonat
Copy link

rmonat commented Nov 4, 2024

Would it also allow you to try out multiple seeds within the 15 minutes limit?

@sim642
Copy link
Owner Author

sim642 commented Nov 4, 2024

sv-sanitizers already can execute the program multiple times (until one finds a violation). And each one initializes randomness differently:

sv-sanitizers/sv-comp.c

Lines 8 to 12 in 54c2e1e

// can't srand at the beginning of main, so GCC constructor
__attribute__((constructor)) static void __sv_sanitizers_srand() {
// getpid to have different seeds for processes created during the same second
srand(time(NULL) ^ getpid());
}

It's just that once a violation is found, the seed and the corresponding values returned by all nondets cannot be inspected to deterministically replay the violation (some SV-COMP tools can do it and witness2test also builds on this idea I think).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants