[Boost-bugs] [Boost C++ Libraries] #9172: Crash when not preserving FPU

Subject: [Boost-bugs] [Boost C++ Libraries] #9172: Crash when not preserving FPU
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-28 07:10:38


#9172: Crash when not preserving FPU
-------------------------------------------------+-----------------------
 Reporter: Alexandre Hamez <alexandre.hamez@…> | Owner: olli
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: coroutine
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
-------------------------------------------------+-----------------------
 I get a SIGBUS when executing the following code:

 {{{
 #include <iostream>
 #include <boost/coroutine/coroutine.hpp>

 typedef boost::coroutines::coroutine<int()> generator;

 void foo(generator::caller_type& yield)
 {
   for (std::size_t i = 0; i < 10; ++i)
     yield(i);
 }

 int main()
 {
   boost::coroutines::attributes attr(false /*don't preserve FPU
 registers*/);
   generator gen(foo, attr);
   while (gen)
   {
     std::cout << gen.get() << std::endl;
     gen();
   }
   return 0;
 };
 }}}

 I tried with gcc 4.8 and clang 3.3 on Mac OS X 10.8 and with gcc 4.8 on
 Linux (CentOS 6). I also tried with the latest Boost trunk (r85977) on Mac
 OS X 10.8.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9172>
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:14 UTC