Skip to content

Commit 761f6d3

Browse files
committed
C++: Disable field flow from the 'cpp/type-confusion' query to fix performance on ChakraCore.
1 parent 4f9bdca commit 761f6d3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cpp/ql/src/Security/CWE/CWE-843/TypeConfusion.ql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ module RelevantStateConfig implements DataFlow::ConfigSig {
215215
predicate isSink(DataFlow::Node sink) {
216216
exists(UnsafeCast cast | sink.asExpr() = cast.getUnconverted())
217217
}
218+
219+
int fieldFlowBranchLimit() { result = 0 }
218220
}
219221

220222
module RelevantStateFlow = DataFlow::Global<RelevantStateConfig>;
@@ -253,6 +255,8 @@ module BadConfig implements DataFlow::StateConfigSig {
253255
predicate isSink(DataFlow::Node sink, FlowState state) { isSinkImpl(sink, state, _, false) }
254256

255257
predicate isBarrierOut(DataFlow::Node sink, FlowState state) { isSink(sink, state) }
258+
259+
int fieldFlowBranchLimit() { result = 0 }
256260
}
257261

258262
module BadFlow = DataFlow::GlobalWithState<BadConfig>;
@@ -307,6 +311,8 @@ module GoodConfig implements DataFlow::StateConfigSig {
307311
isSinkImpl(sink, state, _, true) and
308312
BadFlow::flowTo(sink)
309313
}
314+
315+
int fieldFlowBranchLimit() { result = 0 }
310316
}
311317

312318
module GoodFlow = DataFlow::GlobalWithState<GoodConfig>;

0 commit comments

Comments
 (0)