[Boost-bugs] [Boost C++ Libraries] #2442: Application statically linked with Boost.Thread crashes when Google Desktop is installed (Windows XP)

Subject: [Boost-bugs] [Boost C++ Libraries] #2442: Application statically linked with Boost.Thread crashes when Google Desktop is installed (Windows XP)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-10-27 22:45:31


#2442: Application statically linked with Boost.Thread crashes when Google Desktop
is installed (Windows XP)
--------------------------------------+-------------------------------------
 Reporter: kvo5v7l02_at_[hidden] | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.35.0 | Severity: Problem
 Keywords: thread google desktop GS |
--------------------------------------+-------------------------------------
 Application statically linked with Boost.Thread crashes when Google
 Desktop is installed (Windows XP, VC9).

 Google Desktop installs a hook and injects its DLL to application address
 space on application startup. This DLL creates its own thread, does
 something, and then calls Windows API's `FreeLibraryAndExitThread()`
 function. This function eventually calls
 `boost::detail::create_once_mutex()`, which crashes with VC "buffer
 security check" (see /GS option, which is default). I suppose this is
 because of CRT was not initialized yet (application crashes on the very
 start) and particularly because `__security_init_cookie()` function was
 not called. It seems there are two possible workarounds:

 1. Recompile Boost.Thread with /GS- option

 2. Add an explicit call of `__security_init_cookie()` function, e.g. in
 run_thread_exit_callbacks() function.

 The crash can be reliably reproduced on Windows XP with the latest Google
 Desktop (5.8.0809.23506-en-pb) installed. To reproduce:

 1. Download and unzip test application archive from http://engineering
 .meta-comm.com/resources/boost_thread_with_google_desktop_crash_test.zip

 2. Open the folder with the test application in Windows Explorer, and
 launch several (>= 3) instances of "run.bat" at once.

 I was not able to reproduce it on Windows Vista.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2442>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC