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 user experience with the full recovery mode #102

Closed
wants to merge 4 commits into from

Conversation

kdudka
Copy link
Owner

@kdudka kdudka commented Oct 11, 2024

See the individual commit messages for details.

@kdudka kdudka self-assigned this Oct 11, 2024
kdudka added a commit that referenced this pull request Oct 11, 2024
Predator keeps error recovery cheap in the default configuration.
The special handling of `VO_DEREF_FAILED` on three places can now
be disabled by setting `SE_ERROR_RECOVERY_MODE == 2`.

Related: #102
kdudka added a commit that referenced this pull request Oct 11, 2024
... so that it can call `objByOperand()`, which is protected.

Related: #102
kdudka added a commit that referenced this pull request Oct 11, 2024
... to simulate that invalid operations may by chance write to the
target object within the allocated bounds.  Nevertheless, the same
situation may happen with `executeMemset()`, `executeMemmove()`, etc.

With this change and `SE_ERROR_RECOVERY_MODE == 2`, Predator reports
one more error in the following example:
```
% nl -ba xxx.c
     1  #include <verifier-builtins.h>
     2
     3  int main()
     4  {
     5      int a[10] = {0};
     6      int i = __VERIFIER_nondet_int();
     7      a[i] = 11;
     8      a[a[1]] = 1;
     9  }

% ./slgcc xxx.c
Trying to compile xxx.c ... OK
Running Predator ...
xxx.c:7:10: error: invalid dereference
xxx.c:8:13: error: invalid dereference
cl/cl_easy.cc:83: note: clEasyRun() took 0.000 s
FAILED
```

Related: #102
kdudka added a commit that referenced this pull request Oct 11, 2024
... so that one does not need to rebuild Predator from source code
to enable full error recovery.

Closes: #102
@kdudka kdudka requested a review from lzaoral October 14, 2024 08:14
Predator keeps error recovery cheap in the default configuration.
The special handling of `VO_DEREF_FAILED` on three places can now
be disabled by setting `SE_ERROR_RECOVERY_MODE == 2`.

Related: #102
... so that it can call `objByOperand()`, which is protected.

Related: #102
... to simulate that invalid operations may by chance write to the
target object within the allocated bounds.  Nevertheless, the same
situation may happen with `executeMemset()`, `executeMemmove()`, etc.

With this change and `SE_ERROR_RECOVERY_MODE == 2`, Predator reports
one more error in the following example:
```
% nl -ba xxx.c
     1  #include <verifier-builtins.h>
     2
     3  int main()
     4  {
     5      int a[10] = {0};
     6      int i = __VERIFIER_nondet_int();
     7      a[i] = 11;
     8      a[a[1]] = 1;
     9  }

% ./slgcc xxx.c
Trying to compile xxx.c ... OK
Running Predator ...
xxx.c:7:10: error: invalid dereference
xxx.c:8:13: error: invalid dereference
cl/cl_easy.cc:83: note: clEasyRun() took 0.000 s
FAILED
```

Related: #102
... so that one does not need to rebuild Predator from source code
to enable full error recovery.

Closes: #102
Copy link
Collaborator

@lzaoral lzaoral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't comment on the correctness since I have zero knowledge of the code but it looks ok from code style perspective.

@kdudka
Copy link
Owner Author

kdudka commented Oct 23, 2024

@lzaoral Thanks for review!

@kdudka kdudka closed this in 8b8964d Oct 23, 2024
@kdudka kdudka deleted the error-recovery branch October 23, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants