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

pruntime: Fix memory leak in logging #1318

Merged
merged 1 commit into from
Jun 29, 2023
Merged

pruntime: Fix memory leak in logging #1318

merged 1 commit into from
Jun 29, 2023

Conversation

kvinwang
Copy link
Collaborator

@kvinwang kvinwang commented Jun 21, 2023

pRuntime uses SanitizedSubscriber to filter out logs from other crates, where SanitizedSubscriber is implemented as a thin wrapper over tracing_subscriber::fmt::Subscriber.

However, in the implementation, the methods which have default implementations in the trait Subscriber haven't been forwarded to fmt::Subscriber. This cause the resource management in fmt::Subscriber broken.

This PR fixes it by forwarding all methods to the inner subscriber.

Copy link
Contributor

@h4x3rotab h4x3rotab left a comment

Choose a reason for hiding this comment

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

LGTM

@kvinwang kvinwang merged commit 926806e into master Jun 29, 2023
@kvinwang kvinwang deleted the fix-leak branch June 29, 2023 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants