freepooma-devel
[Top][All Lists]
Advanced

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

[PATCH] Fix Engine/tests/dynamiclayout_test1 failure


From: Richard Guenther
Subject: [PATCH] Fix Engine/tests/dynamiclayout_test1 failure
Date: Sun, 15 Jun 2003 14:38:03 +0200 (CEST)

Hi!

The following patch fixes the failure. The problem is, the default
constructor of Engine<1, T, Remote<Dynamic> > doesnt create a sane
state and such makeOwnCopy() called from ElementProperties::construct
will fail with an assertion.

Tested Layout, Engine and DynamicArray with no new failures on ppc-linux.

Ok?

Richard.


2003Jun15  Richard Guenther <address@hidden>

        * src/Engine/RemoteDynamicEngine.h: (makeOwnCopy) verify engine
        before copying.

Index: RemoteDynamicEngine.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Engine/RemoteDynamicEngine.h,v
retrieving revision 1.19
diff -u -u -r1.19 RemoteDynamicEngine.h
--- RemoteDynamicEngine.h       18 Dec 2002 21:38:19 -0000      1.19
+++ RemoteDynamicEngine.h       15 Jun 2003 12:09:25 -0000
@@ -239,7 +239,7 @@
   inline
   Engine_t &makeOwnCopy()
   {
-    if (engineIsLocal())
+    if (engineIsLocal() && localEnginePtr_m != NULL)
     {
       // Ideally this would be localEnginePtr_m.makeOwnCopy();
       // but Shared<> doesn't implement ElementProperties correctly.
@@ -516,7 +516,7 @@

 template <class T>
 Engine<1, T, Remote<Dynamic> >::Engine()
-  : owningContext_m(0)
+  : owningContext_m(0), localEnginePtr_m(NULL)
 {
   PAssert(owningContext_m < Pooma::contexts());


reply via email to

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