[PATCH] unopkg crasher on SLED11-SP1 (bnc#655912)
Petr Mladek
pmladek at suse.cz
Thu Jan 13 12:13:19 PST 2011
activateExtension call broke memory if dp_misc::getIdentifier and xNewExtension
were called inline; the problem was visible only with gcc-4.3.4 and did not
appear with older or newer gcc versions
valgrind got happy and unopkg stopped crashing after the values were passed via
the extra variables
it looks like a miscompilation; IMHO, it does not make sense to report it
because it does not happen with last gcc version
this code is not critical for the performance, so the workaround with
extra variables is fine; they might even be optimized out by the compiler
---
.../deployment/manager/dp_extensionmanager.cxx | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index c6529ec..56d95a6 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -740,9 +740,19 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
if (repository.equals(OUSTR("user")))
bUserDisabled2 = false;
+ // FIXME: activateExtension call broke memory if dp_misc::getIdentifier and xNewExtension
+ // were called inline; the problem was visible only with gcc-4.3.4 and did not appear
+ // with older or newer gcc versions; valgrind got happy and unopkg stopped crashing
+ // after the values were passed via the extra variables
+ // it looks like a miscompilation; it does not make sense to report it
+ // because it does not happen with last gcc version; this code is not critical
+ // for the performance, so this workaround is fine
+ OUString sNewExtensionIdentifier = dp_misc::getIdentifier(xNewExtension);
+ OUString sNewExtensionFileName = xNewExtension->getName();
+
activateExtension(
- dp_misc::getIdentifier(xNewExtension),
- xNewExtension->getName(), bUserDisabled2, false, xAbortChannel,
+ sNewExtensionIdentifier, sNewExtensionFileName,
+ bUserDisabled2, false, xAbortChannel,
Reference<ucb::XCommandEnvironment>());
}
else
--
1.7.3.4
--=-+tpMriqSxLCOEYkSzGHX--
More information about the LibreOffice
mailing list