DynamoRIO / DynamoRIO/drmemory

Meta issue for TLS data leak reports on Windows

Open
#778 0 comments 0 reactions 0 assignees View on GitHub
Component-LeakCheck Migrated Priority-Medium
Dominant language
C
Stars
2.7k
Forks
290
PR merge metrics
No merged PRs in 30d

Description

_From [rnk@google.com](https://code.google.com/u/rnk@google.com/) on February 09, 2012 10:16:44_

I've seen numerous leak reports about TLS objects, even after resolving issue #5 in r627 to always scan the app's TEB and FLS on all threads during shutdown. Still, we have issues like: issue #751 : rpcrt4 THREAD object leak issue #753 : RtlpUpdateTEBLanguage leaks

We're also missing Chrome's TLS: http://crbug.com/109281 And we have this suppression in Chromium:
KERNELBASE.dll!TlsSetValue
RSAENH.dll!*
RSAENH.dll!*

So there's something going on. There's a couple of possibilities:
- Depending on how the thread is terminated, it may or may not clean up TLS by calling some destructor
- These libraries and apps are not registering a callback to do the free at thread exit (true leak).

One idea I had was to hook thread exit and save each thread's TEB for the final leak scan, just to get an idea of the nature of these leaks. If it turns out that these are all true leaks (the app isn't registering a callback to clean it up), then we may want to provide some flag for apps that don't care about per-thread leaks to enable this behavior.

_Original issue: http://code.google.com/p/drmemory/issues/detail?id=778_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.