Hello community,
here is the log from the commit of package compiz for openSUSE:Factory
checked in at Wed Jul 21 12:13:47 CEST 2010.
--------
--- compiz/compiz.changes 2010-06-14 17:40:02.000000000 +0200
+++ /mounts/work_src_done/STABLE/compiz/compiz.changes 2010-07-21 09:12:29.000000000 +0200
@@ -1,0 +2,43 @@
+Tue Jul 6 20:34:35 UTC 2010 - dimstar@opensuse.org
+
+- 0001-Use-dynamic-allocation-for-plugin-class-indexes-and-.patch
+ added to work around a gcc 4.5 bug.
+
+-------------------------------------------------------------------
+Sun Jul 4 09:00:45 UTC 2010 - dimstar@opensuse.org
+
+- Update to 0.9.0
+ + Rewritten core in C++.
+ + Rewritten plugin APIs.
+ + Rewritten buildsystem in CMake, supports option code
+ autogeneration, plugin build dependency handling, amongst other
+ things.
+ + Smart wrappable functions, enables saving on otherwise useless
+ CPU cycles.
+ + Reparenting window decorations.
+ + Support for tiled textures and screen sizes larger than
+ max_texture_size through the use of the copytex plugin.
+ + Composite and OpenGL based rendering dropped from core, split
+ into the opengl and composite plugins, which represent a step
+ towards pluggable rendering backends.
+ + Ability to run in non composited mode added to
+ gtk-window-decorator and kde4-window-decorator.
+ + kde-window-decorator dropped.
+ + Added KDE plugin to integrate with the QT main loop and create
+ a KApplication for KCrash support on KDE.
+ + dbus plugin now uses screen number to identify compiz instance.
+ + Dropped multi-screen mode, launch compiz on individual screens
+ instead.
+ + Shape drawing mode added to annotate plugin.
+ + Fixed screen updates issue in annotate plugin.
+ + Added serialization interface, which allows plugins to
+ save/restore activity states between plugin and compiz reloads.
+ Serialization info is stored in X11 window properties and is
+ automatically dropped by the X Server when the window is
+ destroyed.
+ + Added compiztoolbox library plugin used by switchers and
+ screenshot, which provide a simple interface for accessing XDG
+ and drawing thumbnails.
+- Split out a -lang package
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
bug-449168-avoid-independent-output-painting.diff
bug-474862-allow-moving-focus-to-fs-window.diff
compiz-0.8.6.tar.bz2
compiz-decorator
compiz-default-settings.diff
compiz-gtk_widget_visible.patch
compiz-java-config-notify.diff
compiz-unmanaged-window-position.patch
kde-auto-comp.diff
New:
----
0001-Use-dynamic-allocation-for-plugin-class-indexes-and-.patch
compiz.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ compiz.spec ++++++
++++ 608 lines (skipped)
++++ between compiz/compiz.spec
++++ and /mounts/work_src_done/STABLE/compiz/compiz.spec
++++++ 0001-Use-dynamic-allocation-for-plugin-class-indexes-and-.patch ++++++
From 5d418445e7b14719debd5397db8ddb7a506af9b0 Mon Sep 17 00:00:00 2001
From: Sam Spilsbury
Date: Wed, 30 Jun 2010 07:34:47 +0800
Subject: [PATCH] Use dynamic allocation for plugin class indexes and store them in screen's CompPrivate's
Previously we used a static variable in class templates to do reference counting of each unique formation of a class. However, there is a bug in gcc or ld which can
cause the variable's contructor to be called in dlopen of another plugin with a similar template with static variables. This in turn generally causes mayhem as the
internal reference count goes to zero, and when a window is next closed, all plugin indexes are free'd even though there are a number of classes that still need
them to be open. And then PluginClassHandler::get () can return NULL, which should never happen (since plugin classes are not NULL checked).
This should fix bugs confirmed to happen with Arch Linux, OpenSUSE 11.3 and any other distribution that uses the GCC 4.5 prerelease.
---
include/core/pluginclasshandler.h | 126 +++++++++++++++++++++++++------------
1 files changed, 86 insertions(+), 40 deletions(-)
diff --git a/include/core/pluginclasshandler.h b/include/core/pluginclasshandler.h
index dde9b0d..48bcbf1 100644
--- a/include/core/pluginclasshandler.h
+++ b/include/core/pluginclasshandler.h
@@ -56,35 +56,47 @@ class PluginClassHandler {
private:
bool mFailed;
Tb *mBase;
-
- static PluginClassIndex mIndex;
};
template
-PluginClassIndex PluginClassHandler::mIndex;
-
-template
PluginClassHandler::PluginClassHandler (Tb *base) :
mFailed (false),
mBase (base)
{
- if (mIndex.pcFailed)
+ /* Store our index reference count as a value in screen */
+ CompString indexKeyName = compPrintf ("%s_index_%lu_structure", typeid (Tp).name (), ABI);
+ CompPrivate pIndex;
+ PluginClassIndex *index;
+
+ if (screen->hasValue (indexKeyName))
{
- mFailed = true;
+ pIndex = screen->getValue (indexKeyName);
+ index = (PluginClassIndex *) pIndex.ptr;
}
else
{
- if (!mIndex.initiated)
+ index = new PluginClassIndex;
+ pIndex.ptr = (void *) index;
+ screen->storeValue (indexKeyName, pIndex);
+ }
+
+ if (index && index->failed)
+ {
+ mFailed = true;
+ }
+ else if (index)
+ {
+ if (!index->initiated)
{
- mIndex.index = Tb::allocPluginClassIndex ();
- if (mIndex.index != (unsigned)~0)
+ index->index = Tb::allocPluginClassIndex ();
+ if (index->index != (unsigned)~0)
{
- mIndex.initiated = true;
- mIndex.failed = false;
- mIndex.pcIndex = pluginClassHandlerIndex;
+ index->initiated = true;
+ index->failed = false;
+ index->pcIndex = pluginClassHandlerIndex;
CompPrivate p;
- p.uval = mIndex.index;
+ p.uval = index->index;
if (!screen->hasValue (keyName ()))
{
@@ -100,36 +112,62 @@ PluginClassHandler::PluginClassHandler (Tb *base) :
}
else
{
- mIndex.failed = true;
- mIndex.initiated = false;
- mIndex.pcFailed = true;
- mIndex.pcIndex = pluginClassHandlerIndex;
+ index->failed = true;
+ index->initiated = false;
+ index->pcFailed = true;
+ index->pcIndex = pluginClassHandlerIndex;
mFailed = true;
}
}
- if (!mIndex.failed)
+ if (!index->failed)
{
- mIndex.refCount++;
- mBase->pluginClasses[mIndex.index] = static_cast (this);
+ mBase->pluginClasses[index->index] = static_cast (this);
}
}
+ else
+ {
+ compLogMessage ("core", CompLogLevelFatal,
+ "Index allocation for \"%s\" failed. Possibly out of memory?",
+ keyName ().c_str ());
+ }
}
template
PluginClassHandler::~PluginClassHandler ()
{
- if (!mIndex.pcFailed)
+ CompString indexKeyName = compPrintf ("%s_index_%lu_structure", typeid (Tp).name (), ABI);
+ CompPrivate pIndex = screen->getValue (indexKeyName);
+ PluginClassIndex *index = (PluginClassIndex *) pIndex.ptr;
+
+ if (index && !index->pcFailed)
{
- mIndex.refCount--;
+ /* Store our index reference count as a value in screen */
+ CompString refCountKeyName = compPrintf ("%s_index_%lu_refCnt", typeid (Tp).name (), ABI);
+ CompPrivate pIndexRefCount;
+
+ if (screen->hasValue (refCountKeyName))
+ {
+ pIndexRefCount = screen->getValue (refCountKeyName);
+ screen->eraseValue (refCountKeyName);
+ }
+ else
+ {
+ pIndexRefCount.uval = 0;
+ }
+
+ pIndexRefCount.uval--;
+ screen->storeValue (refCountKeyName, pIndexRefCount);
- if (mIndex.refCount == 0)
+ if (pIndexRefCount.uval == 0)
{
- Tb::freePluginClassIndex (mIndex.index);
- mIndex.initiated = false;
- mIndex.failed = false;
- mIndex.pcIndex = pluginClassHandlerIndex;
+ Tb::freePluginClassIndex (index->index);
+ index->initiated = false;
+ index->failed = false;
+ index->pcIndex = pluginClassHandlerIndex;
screen->eraseValue (keyName ());
+ delete index;
+ screen->eraseValue (indexKeyName);
pluginClassHandlerIndex++;
}
}
@@ -139,27 +177,35 @@ template
Tp *
PluginClassHandler::get (Tb *base)
{
- if (mIndex.initiated && pluginClassHandlerIndex == mIndex.pcIndex)
+ CompString indexKeyName = compPrintf ("%s_index_%lu_structure", typeid (Tp).name (), ABI);
+ CompPrivate pIndex = screen->getValue (indexKeyName);
+ PluginClassIndex *index = (PluginClassIndex *) pIndex.ptr;
+
+ if (index && index->initiated && pluginClassHandlerIndex == index->pcIndex)
{
return static_cast
- (base->pluginClasses[mIndex.index]);
+ (base->pluginClasses[index->index]);
}
- if (mIndex.failed && pluginClassHandlerIndex == mIndex.pcIndex)
+ if (!index || (index->failed && pluginClassHandlerIndex == index->pcIndex))
return NULL;
- if (screen->hasValue (keyName ()))
+ if (index && screen->hasValue (keyName ()))
{
- mIndex.index = screen->getValue (keyName ()).uval;
- mIndex.initiated = true;
- mIndex.failed = false;
- mIndex.pcIndex = pluginClassHandlerIndex;
- return static_cast (base->pluginClasses[mIndex.index]);
+ index->index = screen->getValue (keyName ()).uval;
+ index->initiated = true;
+ index->failed = false;
+ index->pcIndex = pluginClassHandlerIndex;
+ return static_cast (base->pluginClasses[index->index]);
+ }
+ else if (index)
+ {
+ index->initiated = false;
+ index->failed = true;
+ index->pcIndex = pluginClassHandlerIndex;
+ return NULL;
}
else
{
- mIndex.initiated = false;
- mIndex.failed = true;
- mIndex.pcIndex = pluginClassHandlerIndex;
return NULL;
}
}
--
1.7.1
++++++ compiz-0.8.6.tar.bz2 -> compiz.tar.bz2 ++++++
compiz/compiz-0.8.6.tar.bz2 /mounts/work_src_done/STABLE/compiz/compiz.tar.bz2 differ: char 11, line 1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org