memray icon indicating copy to clipboard operation
memray copied to clipboard

Investigate using -mtls-dialect=gnu2

Open godlygeek opened this issue 2 years ago • 2 comments

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.

godlygeek avatar Jan 19 '23 20:01 godlygeek

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

pablogsal avatar Jan 19 '23 21:01 pablogsal

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

ismail avatar Feb 11 '24 19:02 ismail

Closing as probably we are not going to do it

pablogsal avatar Apr 17 '24 15:04 pablogsal