Boost logo

Boost :

Subject: Re: [boost] Help with VeecoFTC - exception - cloning_test / msvc-9.0~wm5~stlport5.2
From: David Deakins (ddeakins_at_[hidden])
Date: 2010-04-23 16:58:17


Emil Dotchevski wrote:
> On Sat, Feb 6, 2010 at 3:12 PM, David Deakins <ddeakins_at_[hidden]> wrote:
>> Emil Dotchevski wrote:
>>> Can someone help me figure out what's going on here:
>>> http://tinyurl.com/ybpbsp4
>>>
>> Just based on the 'Run' portion of the test info, it looks like the test
>> executable is crashing for some reason when it is running on the Windows
>> Mobile device. I'll try to pull this test up in the debugger sometime this
>> week and see if I can get a more descriptive error message for you.
>
> Thanks!
>

Sorry to take an exceptionally long time to get back to you with this.
We were tied up with a product release much longer than I expected.

The reason for the unusual exit status code on WinCE/Mobile 5 is that
the test is crashing with an access violation in the section where it
tests throwing derives_std_boost_exception or derives_boost_exception.
It took a little excavation, but it appears that this is a exception
handling bug in the CRT on this platform. Apparently whenever you throw
an exception from inside the catch handler of a rethrown exception, it
will confuse the exception handling code and the CRT will delete the
rethrown object after exiting the rethrow catch handler and then delete
it again after exiting the catch handler where the rethrow was done
(wasn't that sentence a mouthful...) So basically anything like:

try
{
   throw object_with_state();
}
catch (...)
{
   try
   {
     throw;
   }
   catch (...)
   {
     try
     {
       throw 5;
     }
     catch (...)
     {
     }
     // object_with_state will incorrectly get deleted at scope exit here
   }
   // object_with_state will get deleted a second time at scope exit here
}

So that appears to be the phenomenon. Unfortunately, I don't have a
good suggestion for anything you can do to work around this problem. It
would be interested to know if this bug was resolved in Mobile 6, but I
don't have that platform set up to test with right now.

Hope this is useful,
-Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk