-
Notifications
You must be signed in to change notification settings - Fork 1
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
KULFI does not support C++ #2
Comments
One piece of clue: On lines around 398 of faults.cpp, the program iterates over a list of function names and does string comparisons. |
Good observation. |
I'm already building LLVM and KULFI in debug+assert mode; it down't show line numbers still. |
I may have found some way to reproduce the bug ----- it actually has nothing to do with C or C++; it may be related to the return type of a CallInst that needs to be injected error! To reproduce the problem on bubblesort, do the following:
int** fancy() { return (int**)0xBAADCAFE; }
And you will see the exact same error. The error are generated in faults.cpp, lines 313, 323, 334, 344, when generating pointer errors (the same may happen to data register errors) where a Call Inst is created (if I understand correctly, the return value of some function is passed to corrupt_*() and modified, and LLVM has a strict requirement that all argument types must agree, even if they are convertible to each other. When it's neither int or void LLVM complains arguments of incompatible type.) So I guess to remove the bug, it may be possible to add 1 instruction before the CallInst() and convert the return value to an int*... |
thanks Sui for the debug data.. I would start working on this issue around Monday...this would be helpful then.. |
I've made the following changes to the code to make LLVM happy: I've added code that
I suddenly realized I am using LLVM 3.3 and it complains errors (argument of incompatible type) when I am attempting to inject errors into pointers, not sure if using LLVM 3.2 would have the same issue. Also, the same error is seen on Function Call instructions. Maybe do the same thing to Function Call instructions ? |
You may want to check with LLVM3.2 + the latest changes that I pushed just now. The latest changes fixes all the open issues/enhancement except this one(C++ support). Adding "C++ support" is WIP and will update once fixed. |
I have identified something that may need to be handled to make Dynamic Fault Injection work with more (preferably C++) code:
These should be the cases we have to add to function InjectError_DataReg_Dyn |
KULFI beta version does not support C++
The text was updated successfully, but these errors were encountered: