-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
runtime: minor bugs fixed in coreclr and libraries #97155
Merged
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5fcb82d
Fixed error: <Pointer, returned from function 'gmtime_r' at filetime.…
kaybelev 09fd2f5
Fixed error: <Return value of a function 'PAL_wcsrchr' is dereference…
kaybelev 3369cbe
Fixed error: <Value sectionRecord, which is result of method invocati…
kaybelev d32b505
Fixed error: <Maybe ecmaCandidateMethod, that created from method wit…
kaybelev 82d4ff2
Update filetime.cpp
kaybelev 202117d
Update process.cpp
kaybelev 41ed108
Update MgmtConfigurationRecord.cs
kaybelev 11e19ea
Update src/libraries/System.Configuration.ConfigurationManager/src/Sy…
kaybelev a7282df
Update src/libraries/System.Configuration.ConfigurationManager/src/Sy…
kaybelev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't actually fix a null reference exception. If sectionRecord could actually be null, this will cause the else block to be executed, which also immediately dereferences sectionRecord.
Unless there's a known repro for this causing a problem, let's revert this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stefan, to correct the error, I propose below in line 346 to change the condition to <if ((sectionRecord != null) && sectionRecord.HasIndirectLocationInputs)>. Stefan, judging by the results of the static analysis, the value returned by the function GetSectionRecord(...) in the library System.Configuration.ConfigurationManager code base should be checked for NULL (you can search (sectionRecord==null or sectionRecord!=null) by searching in the files MgmtConfigurationRecord.cs and BaseConfigurationRecord.cs). I suggest you fix it. It is not possible to check for an error in this case using a test, because it was detected using a static analysis tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is searching for immediate parent section. I assume that the immediate parent section is expected to always exist and that's why there is no null check. Maybe we can add Debug.Assert instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let's try, just explain what needs to be done for this.