Skip to content

[SV-COMP'18 13/19] Memcpy assertions #2002

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

Closed
wants to merge 4 commits into from

Conversation

tautschnig
Copy link
Collaborator

Do not merge: this needs cleanup and review as well as regression tests.

"void CBMC_trace(int lvl, const char *event, ...);\n"

// pointers
"unsigned __CPROVER_POINTER_OBJECT(const void *p);\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

Convention: I think these are usually __CPROVER_lowercase_name

Copy link
Member

Choose a reason for hiding this comment

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

The above seems to have been re-introduced after it got moved out into cprover_builtin_headers.h

@kroening
Copy link
Member

BTW, there's now __CPROVER_ssize_t!

__CPROVER_POINTER_OFFSET(src) + n < __CPROVER_POINTER_OFFSET(dst) ||
__CPROVER_POINTER_OFFSET(dst) + n < __CPROVER_POINTER_OFFSET(src),
"strcpy src/dst overlap");
}
Copy link
Member

Choose a reason for hiding this comment

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

The precondition needs to be at the head of the function!

@TGWDB
Copy link
Contributor

TGWDB commented Feb 23, 2021

This appears SV-COMP'18 specific and not planned to be applied to the whole codebase (also flagged to not be merged and still requiring author cleanup, regression tests, etc.).

If you believe this close is erroneous please reopen.

@TGWDB TGWDB closed this Feb 23, 2021
@martin-cs
Copy link
Collaborator

@tautschnig is this still relevant for the current SV-COMPs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants