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 0eaba2b commit b43891aCopy full SHA for b43891a
javascript/ql/lib/semmle/javascript/GlobalAccessPaths.qll
@@ -565,9 +565,12 @@ module AccessPath {
565
)
566
or
567
// across basic blocks.
568
- exists(Root root, string path |
+ exists(Root root, string path, ReachableBasicBlock readBlock |
569
read.asExpr() = getAccessTo(root, path, AccessPathRead()) and
570
- getAWriteBlock(root, path).strictlyDominates(read.getBasicBlock())
+ readBlock = read.getBasicBlock() and
571
+ // Performance optimisation: check that `read` is in a *reachable* basic block
572
+ // before looking for a dominating write block.
573
+ getAWriteBlock(root, path).strictlyDominates(pragma[only_bind_out](readBlock))
574
575
}
576
0 commit comments