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

Overly strict replacement of std. functions #1435

Open
251 opened this issue Oct 20, 2021 · 0 comments
Open

Overly strict replacement of std. functions #1435

251 opened this issue Oct 20, 2021 · 0 comments

Comments

@251
Copy link
Contributor

251 commented Oct 20, 2021

Standard functions e.g. free are always handled by the Special Function Handler and it is not possible to redefine and execute functions with same name even without Posix runtime and uclibc and incompatible signature:

void free() {
	int a = 42;
	++a;
}

int main(void) {
	free();
}                                                                                                                             
> bin/klee free.bc
KLEE: Using STP solver backend
klee: /klee/lib/Core/SpecialFunctionHandler.cpp:764: void klee::SpecialFunctionHandler::handleFree(klee::ExecutionState&, klee::KInstruction*, std::vector<klee::ref<klee::Expr> >&): Assertion `arguments.size()==1 && "invalid number of arguments to free"' failed.
[...]

We should be more careful here.

Reported by @moyix: https://twitter.com/moyix/status/1450665808976306180

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

No branches or pull requests

1 participant