stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Ostapenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-15) EXCEPTION_DTOR test crashes with VC 7.1 debug
Date Mon, 29 Aug 2005 11:10:13 GMT
    [ http://issues.apache.org/jira/browse/STDCXX-15?page=comments#action_12320411 ] 

Alex Ostapenko commented on STDCXX-15:
--------------------------------------

Yes, I have changed main() to:

int main (int argc, char *argv[])
{
    (void)&argv;

    // try to prevent the compiler from optimizing the dtor call away
    std::exception *ptr;

    if (argc < 0x0FFF) //just a trick to force compiler to leave exception .dtor but "never"
allow to execeute it
    {
       return 0;
    }
    //since test is being executed without arguments we should never get there
    ptr = new Derived;
    delete ptr;
    return 1;
}

And EXCEPTION_DTOR began to work.
However, the same problem exists in the BAD_CAST_DTOR and BAD_TYPEID_DTOR. But they also could
be fixed in the same way.

> EXCEPTION_DTOR test crashes with VC 7.1 debug
> ---------------------------------------------
>
>          Key: STDCXX-15
>          URL: http://issues.apache.org/jira/browse/STDCXX-15
>      Project: STDCXX
>         Type: Bug
>   Components: Configuration
>     Versions: 4.1.3
>  Environment: MS VC++ 7.1 debug build
>     Reporter: Alex Ostapenko
>     Assignee: Martin Sebor

>
> Test asserts on "Damage after normal" block. Probably reason is that std::exception class
declared in the EXCEPTION_DTOR.cpp has different layout from std::exception declared in the
VC headers. Thus external .ctor/.dtor call damages memory beyond the memory block allocated
for a class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message