Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(profiling): remove use of static C++ [backport 2.7] (#8692)
Backport 0c5b7ea from #8682 to 2.7. libdd_wrapper library needs to strike a balance between using modern (safe) C++ and adhering to the manylinux2014 spec. This is made slightly complicated by the fact that manylinux2014 allows for more recent compilers, so we can emit versioned symbols that rely on e.g., GLIBCXX_3.4.21 when GLIBCXX_3.4.19 is the limit. In my laziness, instead of working around these checks, I just statically-linked libstdc++. As you might guess, this causes symbol visibility issues when end-users have a different c++. In particular, it looks like the Locale portion of std::string destruction hardcodes a `free()` which is invalid in certain other contexts, and it is precisely that operation that gets ODR'd to oblivion. Whoopsies! This patch removes the cases that I saw the emission of GLIBCXX_3.4.21. Moving forward, I'll have to cook up the standard dev apparatus for this. Just to be super clear: since this patch removes statically-linking libstdc++, any defects that arise in sofile generation will be caught by the auditwheel phase of the build pipeline. This fixes #8651 ## Checklist - [x] Change(s) are motivated and described in the PR description - [x] Testing strategy is described if automated tests are not included in the PR - [x] Risks are described (performance impact, potential for breakage, maintainability) - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed or label `changelog/no-changelog` is set - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)) - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] If this PR changes the public interface, I've notified `@DataDog/apm-tees`. - [x] If change touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. ## Reviewer Checklist - [x] Title is accurate - [x] All changes are related to the pull request's stated goal - [x] Description motivates each change - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [x] Testing strategy adequately addresses listed risks - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] Release note makes sense to a user of the library - [x] Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) Co-authored-by: David Sanchez <838104+sanchda@users.noreply.github.com>
- Loading branch information