We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42f732c commit ae0e5acCopy full SHA for ae0e5ac
lib/Transforms/Obfuscation/BogusControlFlow.cpp
@@ -138,14 +138,26 @@ namespace {
138
}
139
// If fla annotations
140
if(toObfuscate(flag,&F,"bcf")) {
141
- bogus(F);
142
- doF(*F.getParent());
143
- return true;
+ if (isInvoke(&F)) {
+ bogus(F);
+ doF(*F.getParent());
144
+ return true;
145
+ }
146
147
148
return false;
149
} // end of runOnFunction()
150
151
+ bool isInvoke(Function *f) {
152
+ for (Function::iterator i = f->begin(); i != f->end(); ++i) {
153
+ BasicBlock *bb = &*i;
154
+ if (isa<InvokeInst>(bb->getTerminator())) {
155
+ return false;
156
157
158
159
160
+
161
void bogus(Function &F) {
162
// For statistics and debug
163
++NumFunction;
0 commit comments