bloomberg / memray

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

Investigate using -mtls-dialect=gnu2 #307

Closed godlygeek closed 7 months ago

godlygeek commented 1 year ago

On Ubuntu 22.04, building Memray with USE_MEMRAY_TLS_MODEL=0 results in a broken build, because TLS variables need to be created with malloc, which calls our malloc hook, which tries to access (and create) our TLS variables, resulting in an infinite loop and stack overflow. This problem is fairly unique to how Ubuntu is building its python3 interpreter, but we believe we can work around it by using the modern gnu2 TLS dialect instead.

pablogsal commented 1 year ago

Also if I recall correctly this only happens with the debug version of the interpreter no?

ismail commented 9 months ago

Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113874

pablogsal commented 7 months ago

Closing as probably we are not going to do it