fix: prefix vendored mpack symbols#1880
Conversation
Compile MPack through a Sentry-owned wrapper that maps externally linked MPack symbols to a sentry__mpack_ prefix. Route internal consumers through the wrapper and leave the vendored sources unchanged.
c7b83b0 to
396dd4c
Compare
There was a problem hiding this comment.
this is quite ugly but i still find it better than the alternative of prefixing all symbols in the vendored mpack sources. we should upgrade to the latest mpack, and then it gets painful if ours is heavily modified...
Note
Sentry Native vendors MPack 1.0, released upstream on October 20, 2018—about 7 years and 9 months old today: ludocode/mpack@e150cb7
It was imported into Sentry Native on February 24, 2020, with the Crashpad integration—about 6 years and 5 months ago: e4bed02
It has never been upgraded from 1.0. The vendored files only received two local patches:
- September 15, 2020: work around missing
_Static_assertsupport in MSVC: f143733 - July 23, 2024: use Sentry’s allocator for MPack allocations: e58b655
The latest upstream release remains MPack 1.1.1 from January 2023.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1880 +/- ##
==========================================
- Coverage 75.56% 75.15% -0.42%
==========================================
Files 90 91 +1
Lines 21154 21342 +188
Branches 3759 3759
==========================================
+ Hits 15986 16040 +54
- Misses 4334 4476 +142
+ Partials 834 826 -8 🚀 New features to boost your workflow:
|
Similar to getsentry/crashpad#143, but in C, we don't have namespaces, so the symbol rename comes with some less-nice define trickery... Includes a test to catch unprefixed mpack symbols:
Close: #1878