gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/Property.h


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/Property.h
Date: Thu, 13 Dec 2007 21:33:41 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/12/13 21:33:41

Modified files:
        .              : ChangeLog 
        server         : Property.h 

Log message:
                * server/Property.h: always initialize mOrderId, which is used
                  as the key for secondary multi_index in PropertyList.
                  Seems to fix the infamous conditional jumps based on 
uninitialized
                  values and with it the occasional assertion failure.
                  See bug #21783.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5166&r2=1.5167
http://cvs.savannah.gnu.org/viewcvs/gnash/server/Property.h?cvsroot=gnash&r1=1.16&r2=1.17

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5166
retrieving revision 1.5167
diff -u -b -r1.5166 -r1.5167
--- ChangeLog   13 Dec 2007 21:20:29 -0000      1.5166
+++ ChangeLog   13 Dec 2007 21:33:40 -0000      1.5167
@@ -1,3 +1,11 @@
+2007-12-13 Sandro Santilli <address@hidden>
+
+       * server/Property.h: always initialize mOrderId, which is used
+         as the key for secondary multi_index in PropertyList.
+         Seems to fix the infamous conditional jumps based on uninitialized
+         values and with it the occasional assertion failure.
+         See bug #21783.
+
 2007-12-13  Rob Savoye  <address@hidden>
 
        * cygnal/http.h: Rename getFileType() to getFileStats()

Index: server/Property.h
===================================================================
RCS file: /sources/gnash/gnash/server/Property.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- server/Property.h   13 Dec 2007 15:56:06 -0000      1.16
+++ server/Property.h   13 Dec 2007 21:33:41 -0000      1.17
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: Property.h,v 1.16 2007/12/13 15:56:06 strk Exp $ */ 
+/* $Id: Property.h,v 1.17 2007/12/13 21:33:41 strk Exp $ */ 
 
 #ifndef GNASH_PROPERTY_H
 #define GNASH_PROPERTY_H
@@ -82,43 +82,49 @@
 public:
        /// Default constructor
        Property(string_table::key name = 0, string_table::key nsId = 0) : 
-               mBound(as_value()), mDestructive(false), mName(name), 
mNamespace(nsId)
+               mBound(as_value()), mDestructive(false), mName(name), 
mNamespace(nsId),
+               mOrderId(0)
        {/**/}
 
        /// Copy constructor
        Property(const Property& p) :
                _flags(p._flags), mBound(p.mBound), 
mDestructive(p.mDestructive),
-               mName(p.mName), mNamespace(p.mNamespace)
+               mName(p.mName), mNamespace(p.mNamespace), mOrderId(p.mOrderId)
        {/**/}
 
        /// Constructor taking initial flags
        Property(string_table::key name, string_table::key nsId,
                const as_prop_flags& flags) : _flags(flags),
-               mBound(as_value()), mDestructive(false), mName(name), 
mNamespace(nsId)
+               mBound(as_value()), mDestructive(false), mName(name), 
mNamespace(nsId),
+               mOrderId(0)
        {/**/}
 
        Property(string_table::key name, string_table::key nsId, 
                const as_value& value) : mBound(value), mDestructive(false),
-               mName(name), mNamespace(nsId)
+               mName(name), mNamespace(nsId),
+               mOrderId(0)
        {/**/}
 
        Property(string_table::key name, string_table::key nsId,
                const as_value& value, const as_prop_flags& flags) :
                _flags(flags), mBound(value), mDestructive(false),
-               mName(name), mNamespace(nsId)
+               mName(name), mNamespace(nsId),
+               mOrderId(0)
        {/**/}
 
        Property(string_table::key name, string_table::key nsId,
                as_function *getter, as_function *setter, 
                const as_prop_flags& flags, bool destroy = false) :
                _flags(flags), mBound(as_accessors(getter, setter)),
-               mDestructive(destroy), mName(name), mNamespace(nsId)
+               mDestructive(destroy), mName(name), mNamespace(nsId),
+               mOrderId(0)
        {/**/}
 
        Property(string_table::key name, string_table::key nsId,
                as_function *getter, as_function *setter, bool destroy = false) 
:
                _flags(), mBound(as_accessors(getter, setter)), 
mDestructive(destroy),
-               mName(name), mNamespace(nsId)
+               mName(name), mNamespace(nsId),
+               mOrderId(0)
        {/**/}
 
        /// accessor to the properties flags
@@ -190,6 +196,14 @@
        }
 
        /// Set the order id
+       //
+       /// NOTE: this field is used by one of the indexes
+       ///       in the boost::multi_index used by PropertlyList,
+       ///       so changing this value on an instance which was
+       ///       put in that index might result in corruption of
+       ///       the index invariant. (at least this is what happens
+       ///       with standard containers indexed on an element's member).
+       ///
        void setOrder(int order) { mOrderId = order; }
 
        /// Get the order id




reply via email to

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