-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider comparisons with null to avoid invalid field privatization
A comparison with a null reference might be used to guard a field access. The Field Privatizer does not take such conditional access into account in deciding whether to privatize a field, which can result in its unconditionally copying a field's value into a temporary variable by dereferencing null. This change adds a very simple check for comparisons with null inside of a loop to help to guard against that situation. That will avoid the bug in most cases, but follow up changes that are more robust, general and accurate in avoiding the problem are planned. Signed-off-by: Henry Zongaro <zongaro@ca.ibm.com>
- Loading branch information
Showing
2 changed files
with
59 additions
and
28 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