Workaround bug in EvtFormatMessage#105636
Merged
ericstj merged 3 commits intodotnet:mainfrom Jul 30, 2024
Merged
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-diagnostics-eventlog |
jkoritzinsky
approved these changes
Jul 29, 2024
Member
jkoritzinsky
left a comment
There was a problem hiding this comment.
Use collection expressions? Other than that, looks good.
carlossanlop
approved these changes
Jul 29, 2024
Contributor
carlossanlop
left a comment
There was a problem hiding this comment.
I'll poke around a bit to see if I can manage to get a regression test for this without using the customer file but for now just sharing the fix.
Yes that would be great.
Otherwise, this LGTM.
src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/NativeWrapper.cs
Show resolved
Hide resolved
stephentoub
reviewed
Jul 29, 2024
src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/NativeWrapper.cs
Outdated
Show resolved
Hide resolved
This was referenced Jul 30, 2024
stephentoub
approved these changes
Jul 30, 2024
Member
Author
|
Corrected some mismatched active issues, filed a new active issue for a test crash in linq.expressions. With that BA is passing. |
Member
Author
|
/backport to release/8.0-staging |
Contributor
|
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/10183531351 |
4 tasks
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fix #100198.
This Windows API will still try to write to a buffer if you tell it the buffer is 0 length and the string you're reading happens to be 0 length. We previously avoided an AV here because we were passing a StringBuilder, but that changed with the interop generator refactoring which passed
null. Avoid the bug that by passing in a 1-character buffer rather than null.I've tested manually using the file provided in the issue repro. I'll poke around a bit to see if I can manage to get a regression test for this without using the customer file but for now just sharing the fix.