open-telemetry / open-telemetry/opentelemetry-cpp
[ETW] ETW log exporter possible memory ownership issues
Open
@ThomsonTan is already working on this.
Since May 16, 2025.
bug
Stale
triage/accepted
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 632
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 75
Description
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:
- #3135
- #2651
- #3417
- #3147
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.