Enable vld in multithread process causes endless loop in gettls()

Jan 24, 2011 at 4:35 AM

Hi all,

I attach vld with a DLL which will be dynamically loaded into application's process.  But when there are some other thread(s), gettls() will be called. As the tls for this thread is NULL, so new tls_t will be allocated and TlsSetValue() is called to set tls for this thread. Unluckily,

TlsSetValue() will trigger gettls() calling and then causes endless loop until the thread's stack is full. As I know, vld should support multithread, but seems it doesn't work:(. Is it a defect or something wrong or something missing in my code?