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.
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 itspython3
interpreter, but we believe we can work around it by using the modern gnu2 TLS dialect instead.