Re: [ovs-dev] [PATCH v2] ovs_threads: Avoid running pthread destructors from main thread exit.
On Wed, May 27, 2015 at 9:21 AM, Ben Pfaff wrote: > On Wed, Apr 22, 2015 at 12:20:23PM -0700, Gurucharan Shetty wrote: >> Windows uses pthreads-win32 library to provide the Linux pthread >> functionality. It is observed that when the main thread calls >> a pthread destructor after it exits, undefined behavior is seen >> (e.g., junk values in data, causing pthread deadlocks). >> Similar behavior has been seen by >> other people as seen in the following email thread: >> https://sourceware.org/ml/pthreads-win32/2003/msg1.html >> >> To avoid this, this commit de-registers the thread destructor >> when the main thread exits (via the atexit handler). >> >> Signed-off-by: Gurucharan Shetty >> --- >> v1->v2: Update the commit message to include an example. > > Acked-by: Ben Pfaff Thank you, applied. ___ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH v2] ovs_threads: Avoid running pthread destructors from main thread exit.
On Wed, Apr 22, 2015 at 12:20:23PM -0700, Gurucharan Shetty wrote: > Windows uses pthreads-win32 library to provide the Linux pthread > functionality. It is observed that when the main thread calls > a pthread destructor after it exits, undefined behavior is seen > (e.g., junk values in data, causing pthread deadlocks). > Similar behavior has been seen by > other people as seen in the following email thread: > https://sourceware.org/ml/pthreads-win32/2003/msg1.html > > To avoid this, this commit de-registers the thread destructor > when the main thread exits (via the atexit handler). > > Signed-off-by: Gurucharan Shetty > --- > v1->v2: Update the commit message to include an example. Acked-by: Ben Pfaff ___ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
