sleuthkit/sleuthkit — pull request #285 by antonkukoba (2013-12-26 12:16:08+00:00)
Title: Fixed Tls initialization problem

Visual Studio optimization removes GetTlsIndex class constructor execution in release builds, due to it's not used anywhere. So the previous code has never initialized tlsIndex variable with anything. Such behavior sometime caused the crashes due to error code was not saved into unallocated TLS.
I've made the explicit calls of GetTlsIndex methods to force class instance creation.
p.s. You may see it yourself how TlsGetValue() fails each time by running the release build under MS Application verifier.