Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Workaround bug in EvtFormatMessage - #105636

#105636
Merged
ericstj merged 3 commits into
dotnet:maindotnet/runtime:mainfrom
ericstj:fix100198ericstj/runtime:fix100198Copy head branch name to clipboard
Jul 30, 2024
Merged

Workaround bug in EvtFormatMessage#105636
ericstj merged 3 commits into
dotnet:maindotnet/runtime:mainfrom
ericstj:fix100198ericstj/runtime:fix100198Copy head branch name to clipboard

Conversation

@ericstj

@ericstj ericstj commented Jul 29, 2024

Copy link
Copy Markdown
Member

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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-diagnostics-eventlog
See info in area-owners.md if you want to be subscribed.

@jkoritzinsky jkoritzinsky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use collection expressions? Other than that, looks good.

@carlossanlop carlossanlop left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ericstj

ericstj commented Jul 30, 2024

Copy link
Copy Markdown
Member Author

Corrected some mismatched active issues, filed a new active issue for a test crash in linq.expressions. With that BA is passing.

@ericstj

ericstj commented Jul 31, 2024

Copy link
Copy Markdown
Member Author

/backport to release/8.0-staging

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/10183531351

@github-actions github-actions Bot locked and limited conversation to collaborators Aug 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EventLogRecord.TaskDisplayName throws System.AccessViolationException and termintates the program

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.