bloomberg / memray

Memray is a memory profiler for Python
https://bloomberg.github.io/memray/
Apache License 2.0
13.17k stars 392 forks source link

Do not patch PLT stubs for MallocStackLogging in MacOS #477

Closed pablogsal closed 11 months ago

pablogsal commented 11 months ago

MacOS has some memory interposition libraries that can make us crash (via stackoverflow when initializing TLS variables) if we patch them. This is because these libraries interact in a way we cannot avoid with libdyld, which in turn sets the TLS on first init.

Closes: #476

codecov-commenter commented 11 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (c016ce5) 91.97% compared to head (0bd8479) 92.15%. Report is 19 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #477 +/- ## ========================================== + Coverage 91.97% 92.15% +0.18% ========================================== Files 91 91 Lines 10803 10849 +46 Branches 1485 1498 +13 ========================================== + Hits 9936 9998 +62 + Misses 865 849 -16 Partials 2 2 ``` | [Flag](https://app.codecov.io/gh/bloomberg/memray/pull/477/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | Coverage Δ | | |---|---|---| | [cpp](https://app.codecov.io/gh/bloomberg/memray/pull/477/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | `85.68% <ø> (+0.45%)` | :arrow_up: | | [python_and_cython](https://app.codecov.io/gh/bloomberg/memray/pull/477/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | `95.44% <ø> (+0.02%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg#carryforward-flags-in-the-pull-request-comment) to find out more. [see 16 files with indirect coverage changes](https://app.codecov.io/gh/bloomberg/memray/pull/477/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.