[tbb-bugs] #18171 [Tor Browser]: Dlls brokenness with Windows10 Build 14251

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Jan 31 08:35:00 UTC 2016


#18171: Dlls brokenness with Windows10 Build 14251
-------------------------+--------------------------
 Reporter:  Coh_t        |          Owner:  tbb-team
     Type:  defect       |         Status:  new
 Priority:  Medium       |      Milestone:
Component:  Tor Browser  |        Version:
 Severity:  Normal       |     Resolution:
 Keywords:               |  Actual Points:
Parent ID:               |         Points:
  Sponsor:               |
-------------------------+--------------------------

Comment (by cypherpunks):

 New Windows Build might to uncover some bug in dlls, Microsoft could to
 cover it back in next build or not.

 So what about dll entry point:
 > The entry-point function should perform only simple initialization or
 termination tasks. It must not call the LoadLibrary or LoadLibraryEx
 function (or a function that calls these functions), because this may
 create dependency loops in the DLL load order. **This can result in a DLL
 being used before the system has executed its initialization code**.
 Similarly, the entry-point function must not call the FreeLibrary function
 (or a function that calls FreeLibrary) during process termination, because
 this can result in a DLL being used after the system has executed its
 termination code.

 > Because Kernel32.dll is guaranteed to be loaded in the process address
 space when the entry-point function is called, calling functions in
 Kernel32.dll does not result in the DLL being used before its
 initialization code has been executed. Therefore, the entry-point function
 can call functions in Kernel32.dll that do not load other DLLs. For
 example, DllMain can create synchronization objects such as critical
 sections and mutexes, and use TLS. Unfortunately, there is not a
 comprehensive list of safe functions in Kernel32.dll.

 > Calling functions that require DLLs other than Kernel32.dll may result
 in problems that are difficult to diagnose. For example, calling User,
 Shell, and COM functions can cause access violation errors, because some
 functions load other system components. Conversely, calling functions such
 as these during termination can cause access violation errors because the
 corresponding component may already have been unloaded or uninitialized.

 > Because DLL notifications are serialized, entry-point functions should
 not attempt to communicate with other threads or processes. Deadlocks may
 occur as a result.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18171#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tbb-bugs mailing list