Skip to content

[ETW] ETW log exporter possible memory ownership issues #3418

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

Open
marcalff opened this issue May 15, 2025 · 2 comments
Open

[ETW] ETW log exporter possible memory ownership issues #3418

marcalff opened this issue May 15, 2025 · 2 comments
Assignees
Labels
bug Something isn't working needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@marcalff
Copy link
Member

This is not confirmed with testing, only a suspicion raised by code review.

The ostream log exporter has memory ownership issues that can lead to crashes.

See related:

It turns out (seen by code review) that file etw_logger.h uses exactly the same pattern,
so it should be subject to the same issues.

  std::unordered_map<std::string, opentelemetry::common::AttributeValue> attributes_map_;
  opentelemetry::common::AttributeValue body_ = opentelemetry::nostd::string_view();

attributes_map_ and body_ can contain stale pointers.

@marcalff marcalff added the bug Something isn't working label May 15, 2025
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 15, 2025
@lalitb
Copy link
Member

lalitb commented May 15, 2025

Is this issue related to ETW exporter (as in title), or ostream ?

@marcalff
Copy link
Member Author

Is this issue related to ETW exporter (as in title), or ostream ?

This is about ETW, see file etw_logger.h

@ThomsonTan ThomsonTan self-assigned this May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

3 participants