[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] dangers of intrusive_ptr misuse

From: strk
Subject: [Gnash-dev] dangers of intrusive_ptr misuse
Date: Fri, 2 Feb 2007 19:16:01 +0100

I just wanted to share with you a test file used to verify how dangerous is
the current use of boost::intrusive_ptr by Gnash.

Basically, the intrusive_ptr chain must NOT be broken, or premature deletion,
with consequent memory corruption will happen.

See this bug for an examplar sympthom:
Note that the bug can reveal itself much later then the time in which it is
introduced, so it's worth inspecting for possible early-catcher solutions.

The attached testcase contains a "forbid-deletion" mechanism making debugging
easier. We might want to add this to gnash as well when facing similar problems
or rething the whole smart pointers model. On a side-note, it seems that 
will be deprecated by boost dev team.

Comments welcome.


 ()   ASCII Ribbon Campaign
 /\   Keep it simple! 

Attachment: intrusive.cpp
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]