[Boost-bugs] [Boost C++ Libraries] #8863: BOOST_ATTRIBUTE_NORETURN causes stack pointer corruption

Subject: [Boost-bugs] [Boost C++ Libraries] #8863: BOOST_ATTRIBUTE_NORETURN causes stack pointer corruption
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-19 21:36:57


#8863: BOOST_ATTRIBUTE_NORETURN causes stack pointer corruption
-------------------------------------------------+-------------------------
 Reporter: Janosch <gagabla0@…> | Owner:
     Type: Bugs | emildotchevski
Milestone: To Be Determined | Status: new
  Version: Boost 1.54.0 | Component: exception
 Keywords: exception throw_exception | Severity: Problem
  BOOST_ATTRIBUTE_NORETURN stack-pointer |
-------------------------------------------------+-------------------------
 Hello,
 i ran into a strange problem with a very small project of mine. Whenever
 an exception is thrown in a boost package using boost::throw_exception and
 my program terminates (no exceptions are beeing catched yet) i get a
 message box saying:

     Run-Time Check Failure #0 - The value of ESP was not properly saved
 across a function call ...

 I was able to track this down to the BOOST_ATTRIBUTE_NORETURN declaration
 of boost::throw_exception. When i remove this from a copy of this
 function, the problem disappears.

 I am compiling with the following settings:
 - Compiler: MS Visual Studio C++ 2010 Express
 - Multithreading: yes
 - Runtime-linking: static
 - Build-type: debug

 My minimal test-program looks like this:

   #include "boost/throw_exception.hpp"

   int main(int argc, char* argv[])
   {
     boost::throw_exception(std::exception("foo")); // <-- this will
 produce the problem

     return 0;
   }

 I originally asked about the problem here:
 http://stackoverflow.com/questions/17599772/boost-exceptions-lead-to-
 stack-pointer-corruption-run-time-check-failure-0

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