Skip to content
Snippets Groups Projects
  • antonkukoba's avatar
    1e07be4d
    Fixed Tls initialization problem · 1e07be4d
    antonkukoba authored
    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.
    1e07be4d
    History
    Fixed Tls initialization problem
    antonkukoba authored
    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.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.