[Insight-developers] ExceptionObject assignment crash on MSVC

Niels Dekker niels-xtk at xs4all.nl
Fri May 30 14:46:48 EDT 2008


Luis Ibanez wrote:
> Removing the lines from the test may not be the right way to
> address the problem. That will just give us a deceptively
> green Dashboard and a false sense of security.

Sorry, typo, I meant to say: feel free to remove those two lines of code 
from itkExceptionObject.cxx:

  // Assign its superclass:
  static_cast<Superclass &>(*this) = orig;

I didn't mean to suggest changing the test.


> The memory leak reported for std::exception shouldn't result
> in a crash, isn't it? ... it should just ... leak memory.

Good point. But still, the bug report on the Microsoft website gives me 
a bad feeling about their implementation of std::exception::operator=. 
Hope you can prove me wrong.

> I'll try running this in Debug mode...

Please do. Note that the previous version of itk::ExceptionObject 
(before I did anything to the class) didn't call 
std::exception::operator=.  And it didn't crash!


Now I'm really going home!  Sorry to leave you with the crash (at least 
for today).


Kind regards,

Niels







More information about the Insight-developers mailing list