Re: [Boost-bugs] [Boost C++ Libraries] #5763: Segmentation fault in ASIO signal handler

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5763: Segmentation fault in ASIO signal handler
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-08-08 13:23:12


#5763: Segmentation fault in ASIO signal handler
-------------------------------------------+--------------------------------
  Reporter: Vladislav <phprus@…> | Owner: chris_kohlhoff
      Type: Patches | Status: new
 Milestone: To Be Determined | Component: asio
   Version: Boost 1.47.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------------------+--------------------------------

Comment (by chris_kohlhoff):

 I was able to reproduce the issue, and I believe the correct fix is to
 apply the following change to
 asio/include/asio/detail/gcc_x86_fenced_block.hpp:

 {{{
 @@ -43,8 +43,12 @@ public:
  private:
    static int barrier()
    {
 - int r = 0;
 - __asm__ __volatile__ ("xchgl %%eax, %0" : "=m" (r) : : "memory",
 "cc");
 + int r = 0, m = 1;
 + __asm__ __volatile__ (
 + "xchgl %0, %1" :
 + "=r"(r), "=m"(m) :
 + "0"(1), "m"(m) :
 + "memory", "cc");
      return r;
    }
  };
 }}}

 Can you please try this change and let me know if it also corrects the
 issue for you.

 Note that using the gcc_sync_fenced_block class does improve performance
 slightly, so I will also look to include your patch in the near future.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5763#comment:7>
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:50:07 UTC