Michael Kelly, le jeu. 07 août 2025 13:07:07 +0100, a ecrit: > On 07/08/2025 12:13, Samuel Thibault wrote: > > > TLS code is really difficult to debug indeed. But I'd doubt that's the > > > issue, as it is largely used for many other cases, and the code is > > > actually very trivial: just reading/writing %gs:0x38. > > > > > > And it's probably very easy for calls to __mig_get_reply_port() / > > > __mig_dealloc_reply_port () to get wrong with mismatched cleanup code, > > > e.g. > > > > > > port = __mig_get_reply_port() > > > __mig_dealloc_reply_port(port); > > > port2 = __mig_get_reply_port() > > > __mig_dealloc_reply_port(port); > > I do hope that you are right although I hadn't expected mismatches from > generated code.
I wouldn't indeed, but there are also signal management and a couple explicit calls. It could be worth trying to put code in them that checks for coherency of calls. Samuel

