-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Having `ret null` as a model is not the best, especially for predicate functions (e.g. `is_type_struct_c`) because it confuses the analysis with false nullptr dereferences which is especially problematic when `pulse-force-continue` is not set. This diff uses `nondet` for predicate functions. We could delete models but then builtins would accumulate in `skipped_calls`. I also removed a few `ret null` models where it wasn't easy to write something reasonabe. NOTE: that there are 2 `ret null` models that we can't delete because otherwise we get a bunch of FPs in tests. These need to be looked at. Reviewed By: davidpichardie Differential Revision: D45852568 fbshipit-source-id: 3671bd024e268ce4a474978774e66435b7bd34f7
- Loading branch information
1 parent
6c8aba8
commit f28823f
Showing
5 changed files
with
33 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) Facebook, Inc. and its affiliates. | ||
// | ||
// This source code is licensed under the MIT license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
namespace ControlFlow; | ||
|
||
|
||
function typeCheckDoesntConfuseTheAnalysis_maintainsTaint_Bad(mixed $arg1, SensitiveClass $sc) { | ||
if ($arg1 is Foo) { | ||
\Level1\taintSink($sc); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters