Skip to content

Commit

Permalink
Discard transforms when checking partial fulfillment of exploitabilit…
Browse files Browse the repository at this point in the history
…y rules

Summary: Currently, exploitability rules doesn't support rules with transforms. However, with the kind based sanitizers, the kind can have a `SanitizerSetTransform` which is not part of the rules. This diff discards all transforms when checking for partially fulfilled exploitability rules.

Reviewed By: yuhshin-oss

Differential Revision: D60404798

fbshipit-source-id: 0896aa8477bbecf5ef274a33401300103c9736da
  • Loading branch information
Anwesh Tuladhar authored and facebook-github-bot committed Jul 29, 2024
1 parent 16e576a commit b345f32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion source/SourceSinkWithExploitabilityRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ std::unique_ptr<Rule> SourceSinkWithExploitabilityRule::from_json(
"effect_sources",
"sources",
"sinks",
"transforms",
"oncall"});

KindSet effect_source_kinds;
Expand Down
3 changes: 2 additions & 1 deletion source/TransformsFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ TransformsFactory::reverse(const TransformList* MT_NULLABLE transforms) const {

const TransformList* MT_NULLABLE
TransformsFactory::get_source_as_transform(const Kind* kind) const {
if (const auto* source_as_transform = source_as_transform_.get(kind)) {
if (const auto* source_as_transform =
source_as_transform_.get(kind->discard_transforms())) {
return transform_lists_.get(TransformList({source_as_transform}));
}

Expand Down

0 comments on commit b345f32

Please sign in to comment.