Skip to content
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

Fix LoggingEventSource to handle null strings #2957

Merged
merged 3 commits into from
Mar 10, 2020

Conversation

sywhang
Copy link

@sywhang sywhang commented Feb 12, 2020

Fix issue initially reported in this issue: microsoft/perfview#1092.

EventSource.WriteEventCore does not play nicely with null strings passed directly.

This fixes #2958.

cc @davidfowl @josalem

@davidfowl
Copy link
Member

We should file a bug here

@sywhang
Copy link
Author

sywhang commented Feb 12, 2020

Filed #2958

@davidfowl
Copy link
Member

Do we have any tests for this?

@sywhang
Copy link
Author

sywhang commented Feb 12, 2020

I can add some with this PR.

@davidfowl
Copy link
Member

Can we make this change in one place SetEventData? Just do value ?? “”

@josalem
Copy link

josalem commented Feb 12, 2020

You would need to make the swap before you fix the char* I think, so it might require a refactor of how SetEventData is used. The char* needs to be fixed until WriteEventCore returns.

@sywhang sywhang requested a review from davidfowl March 3, 2020 22:56
@davidfowl
Copy link
Member

I got a pretty sweet hack for this

@tommcdon tommcdon added this to the 5.0.0 milestone Mar 10, 2020
@sywhang sywhang merged commit 8d0fa05 into dotnet:master Mar 10, 2020
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 11, 2020
…x-logging-event-source

Fix LoggingEventSource to handle null strings


Commit migrated from dotnet/extensions@8d0fa05
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 27, 2020
…x-logging-event-source

Fix LoggingEventSource to handle null strings


Commit migrated from dotnet/extensions@8d0fa05
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 27, 2020
…x-logging-event-source

Fix LoggingEventSource to handle null strings


Commit migrated from dotnet/extensions@8d0fa05
JunTaoLuo pushed a commit to dotnet/aspnetcore that referenced this pull request Nov 17, 2020
…x-logging-event-source

Fix LoggingEventSource to handle null strings\n\nCommit migrated from dotnet/extensions@8d0fa05
@ghost ghost locked as resolved and limited conversation to collaborators May 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LoggingEventSource can create wrong event payloads
5 participants