Skip to content

JS: Add flow through next() calls in RxJS #6571

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove bad optimization
  • Loading branch information
erik-krogh committed Dec 1, 2021
commit 111f770635f9370bfd0a52bb85441af504a582aa
22 changes: 7 additions & 15 deletions javascript/ql/lib/semmle/javascript/dataflow/Configuration.qll
Original file line number Diff line number Diff line change
Expand Up @@ -1160,18 +1160,18 @@ private predicate reachableFromInput(
}

/**
* Holds if there is a level step from `mid` to `nd` under `cfg` that can be appended
* to a path represented by `oldSummary` yielding a path represented by `summary`.
* Holds if there is a level step from `pred` to `succ` under `cfg` that can be appended
* to a path represented by `oldSummary` yielding a path represented by `newSummary`.
*/
pragma[noopt]
pragma[noinline]
private predicate appendStep(
DataFlow::Node mid, DataFlow::Configuration cfg, PathSummary oldSummary, DataFlow::Node nd,
PathSummary summary
DataFlow::Node pred, DataFlow::Configuration cfg, PathSummary oldSummary, DataFlow::Node succ,
PathSummary newSummary
) {
exists(PathSummary stepSummary |
flowStep(mid, cfg, nd, stepSummary) and
flowStep(pred, cfg, succ, stepSummary) and
stepSummary.isLevel() and
summary = oldSummary.append(stepSummary)
newSummary = oldSummary.append(stepSummary)
)
}

Expand Down Expand Up @@ -1317,13 +1317,6 @@ private predicate reachesReturn(
summary = PathSummary::level() and
callInputStep(f, _, _, _, _) // check that a relevant result can exist.
or
reachesReturnRec(f, read, cfg, summary)
}

pragma[noopt]
private predicate reachesReturnRec(
Function f, DataFlow::Node read, DataFlow::Configuration cfg, PathSummary summary
) {
exists(DataFlow::Node mid, PathSummary oldSummary, PathSummary newSummary |
flowStep(read, cfg, mid, oldSummary) and
reachesReturn(f, mid, cfg, newSummary) and
Expand Down Expand Up @@ -1614,7 +1607,6 @@ private predicate flowIntoHigherOrderCall(
* Holds if there is a flow step from `pred` to `succ` described by `summary`
* under configuration `cfg`.
*/
pragma[noinline]
private predicate flowStep(
DataFlow::Node pred, DataFlow::Configuration cfg, DataFlow::Node succ, PathSummary summary
) {
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy