Skip to content
This repository has been archived by the owner on Oct 3, 2021. It is now read-only.

Fix Problems with Benchmark Set #1279

Merged
merged 4 commits into from
Dec 19, 2020
Merged

Fix Problems with Benchmark Set #1279

merged 4 commits into from
Dec 19, 2020

Conversation

Eiram
Copy link
Contributor

@Eiram Eiram commented Dec 14, 2020

Removed property coverage-error from one property file because it is no longer appropriate and
initialize variables mainly in openssl tasks to avoid that they are used uniitialized, which causes problems with test case validation.

@dbeyer dbeyer changed the title Fix Problems with Test-Comp Benchmark Set Fix Problems with Benchmark Set Dec 17, 2020
@dbeyer
Copy link
Member

dbeyer commented Dec 17, 2020

Changed title because this applies also to SV-COMP.

@cedricrupb
Copy link

This PR is also interesting for the verification community. Maybe related to issue #1270.

Copy link
Member

@dbeyer dbeyer left a comment

Choose a reason for hiding this comment

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

Fixes undefined behavior.

Copy link
Contributor

@mchalupa mchalupa left a comment

Choose a reason for hiding this comment

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

The changes look ok, but IMHO we could get the same result with smaller changes to the code (see the comments). What do you think, @Eiram ?

Note that this is not a request for change, just a general comment

s->info_callback = (void (*) ()) __VERIFIER_nondet_ulong();
s->options = __VERIFIER_nondet_ulong();
s->verify_mode = __VERIFIER_nondet_int();
(s->session)->peer = (struct x509_st*) __VERIFIER_nondet_ulong();
Copy link
Contributor

Choose a reason for hiding this comment

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

The same here, peer is agian used only in comparisions to 0. I wonder whether it wouldn't be better just to replace the comparisions with __VERIFIER_nondet_bool?

@@ -1074,6 +1074,25 @@ int main(void)
s->ctx = malloc(sizeof(SSL_CTX));
s->session = malloc(sizeof(SSL_SESSION));
s->state = 8464;

s->info_callback = (void (*) ()) __VERIFIER_nondet_ulong();
Copy link
Contributor

Choose a reason for hiding this comment

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

I was puzzled by this initialization, but info_callback is only compared to 0, so this should actually work fine.

(s->ctx)->info_callback = (void (*)()) __VERIFIER_nondet_ulong();
s->init_buf = (BUF_MEM *)__VERIFIER_nondet_ulong();
s->bbio = (BIO *) __VERIFIER_nondet_ulong();
s->wbio = (BIO *) __VERIFIER_nondet_ulong();
Copy link
Contributor

Choose a reason for hiding this comment

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

Here wbio and bbio are used to be compared against themselves on line 1303 but no action is taken based on the result (the body of if-else is empty). Wouldn't it be easier just to remove the whole comparison on line 1303?

@dbeyer
Copy link
Member

dbeyer commented Dec 19, 2020

@Eiram and @mchalupa Many tahnks for your contribution. I propose to implement the suggested improvements in a new PR, such that we can go ahead with this one immediately.

@dbeyer dbeyer merged commit 83af2a1 into sosy-lab:master Dec 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

4 participants