Protect against calling a function with an unexpected signature.
This commit is contained in:
parent
4e4d39d389
commit
fff83003a6
@ -175,6 +175,9 @@ IncrementalExecutor::executeFunction(llvm::StringRef funcname,
|
|||||||
"could not find function named " << funcname << '\n';
|
"could not find function named " << funcname << '\n';
|
||||||
return kExeFunctionNotCompiled;
|
return kExeFunctionNotCompiled;
|
||||||
}
|
}
|
||||||
|
assert (f->getFunctionType()->getNumParams() == 1
|
||||||
|
&& (*f->getFunctionType()->param_begin())->isPtrOrPtrVectorTy() &&
|
||||||
|
"Wrong signature");
|
||||||
typedef void (*PromptWrapper_t)(void*);
|
typedef void (*PromptWrapper_t)(void*);
|
||||||
union {
|
union {
|
||||||
PromptWrapper_t wrapperFunction;
|
PromptWrapper_t wrapperFunction;
|
||||||
|
Loading…
Reference in New Issue
Block a user