moz/makefile.mk | 4 - moz/patches/nss-linux3.patch | 13 +++ moz/seamonkey-source-1.1.14.patch | 16 ---- sal/rtl/source/alloc_impl.h | 7 + solenv/gbuild/Library.mk | 4 - solenv/gbuild/platform/ios.mk | 1 solenv/gbuild/platform/macosx.mk | 1 solenv/gbuild/platform/unxgcc.mk | 1 svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx | 53 +++------------ 9 files changed, 42 insertions(+), 58 deletions(-)
New commits: commit d34a819233de940dcfe389fc87baebfbcbc7da66 Author: Michael Stahl <mst...@redhat.com> Date: Tue Oct 18 17:35:52 2011 +0200 fdo#41935: deadlock in ViewObjectContactOfUnoControl Remove the mutex member of ViewObjectContactOfUnoControl_Impl and use the SolarMutex instead, because the current usage of 2 mutexes is just too prone to deadlock. diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index a0056f8..ab1a2d1 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -564,19 +564,15 @@ namespace sdr { namespace contact { class SVX_DLLPRIVATE ViewObjectContactOfUnoControl_Impl : public ViewObjectContactOfUnoControl_Impl_Base { private: + // fdo#41935 note that access to members is protected with SolarMutex; + // the class previously had its own mutex but that is prone to deadlock + /// the instance whose IMPL we are ViewObjectContactOfUnoControl* m_pAntiImpl; /// are we currently inside impl_ensureControl_nothrow? bool m_bCreatingControl; - /** thread safety - - (not really. ATM only our X* implementations are guarded with this, but not - the object as a whole.) - */ - mutable ::osl::Mutex m_aMutex; - /// the control we're responsible for ControlHolder m_aControl; @@ -683,9 +679,6 @@ namespace sdr { namespace contact { ControlHolder& _out_rControl ); - struct GuardAccess { friend class VOCGuard; private: GuardAccess() { } }; - ::osl::Mutex& getMutex( GuardAccess ) const { return m_aMutex; } - const ViewContactOfUnoControl& getViewContact() const { @@ -879,23 +872,6 @@ namespace sdr { namespace contact { }; //==================================================================== - //= VOCGuard - //==================================================================== - /** class for guarding a ViewObjectContactOfUnoControl_Impl method - */ - class VOCGuard - { - private: - ::osl::MutexGuard m_aMutexGuard; - - public: - VOCGuard( const ViewObjectContactOfUnoControl_Impl& _rImpl ) - :m_aMutexGuard( _rImpl.getMutex( ViewObjectContactOfUnoControl_Impl::GuardAccess() ) ) - { - } - }; - - //==================================================================== //= LazyControlCreationPrimitive2D //==================================================================== class LazyControlCreationPrimitive2D : public ::drawinglayer::primitive2d::BufferedDecompositionPrimitive2D @@ -1026,7 +1002,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void ViewObjectContactOfUnoControl_Impl::dispose() { - VOCGuard aGuard( *this ); + SolarMutexGuard aSolarGuard; impl_dispose_nothrow( true ); } @@ -1441,7 +1417,6 @@ namespace sdr { namespace contact { // which alone needs the SolarMutex. Of course this - a removeFooListener needed the SolarMutex - // is the real bug. Toolkit really is infested with solar mutex usage ... :( // #i82169# / 2007-11-14 / frank.schoenh...@sun.com - VOCGuard aGuard( *this ); if ( !m_aControl.is() ) return; @@ -1474,14 +1449,14 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void SAL_CALL ViewObjectContactOfUnoControl_Impl::windowShown( const EventObject& /*e*/ ) throw(RuntimeException) { - VOCGuard aGuard( *this ); + SolarMutexGuard aSolarGuard; m_bControlIsVisible = true; } //-------------------------------------------------------------------- void SAL_CALL ViewObjectContactOfUnoControl_Impl::windowHidden( const EventObject& /*e*/ ) throw(RuntimeException) { - VOCGuard aGuard( *this ); + SolarMutexGuard aSolarGuard; m_bControlIsVisible = false; } @@ -1495,7 +1470,6 @@ namespace sdr { namespace contact { if ( impl_isDisposed_nofail() ) return; - VOCGuard aGuard( *this ); DBG_ASSERT( m_aControl.is(), "ViewObjectContactOfUnoControl_Impl::propertyChange: " ); if ( !m_aControl.is() ) return; @@ -1510,7 +1484,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void SAL_CALL ViewObjectContactOfUnoControl_Impl::modeChanged( const ModeChangeEvent& _rSource ) throw (RuntimeException) { - VOCGuard aGuard( *this ); + SolarMutexGuard aSolarGuard; DBG_ASSERT( _rSource.NewMode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "design" ) ) || _rSource.NewMode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "alive" ) ), "ViewObjectContactOfUnoControl_Impl::modeChanged: unexpected mode!" ); @@ -1545,7 +1519,6 @@ namespace sdr { namespace contact { // which alone needs the SolarMutex. Of course this - a removeFooListener needed the SolarMutex - // is the real bug. Toolkit really is infested with solar mutex usage ... :( // #i82169# / 2007-11-14 / frank.schoenh...@sun.com - VOCGuard aGuard( *this ); DBG_ASSERT( Event.Source == m_xContainer, "ViewObjectContactOfUnoControl_Impl::elementRemoved: where did this come from?" ); if ( m_aControl == Event.Element ) @@ -1555,7 +1528,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void SAL_CALL ViewObjectContactOfUnoControl_Impl::elementReplaced( const ContainerEvent& Event ) throw (RuntimeException) { - VOCGuard aGuard( *this ); + SolarMutexGuard aSolarGuard; DBG_ASSERT( Event.Source == m_xContainer, "ViewObjectContactOfUnoControl_Impl::elementReplaced: where did this come from?" ); if ( ! ( m_aControl == Event.ReplacedElement ) ) @@ -1742,7 +1715,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- bool ViewObjectContactOfUnoControl::isControlVisible() const { - VOCGuard aGuard( *m_pImpl ); + SolarMutexGuard aSolarGuard; const ControlHolder& rControl( m_pImpl->getExistentControl() ); return rControl.is() && rControl.isVisible(); } @@ -1750,7 +1723,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- Reference< XControl > ViewObjectContactOfUnoControl::getControl() { - VOCGuard aGuard( *m_pImpl ); + SolarMutexGuard aSolarGuard; m_pImpl->ensureControl( NULL ); return m_pImpl->getExistentControl().getControl(); } @@ -1770,7 +1743,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void ViewObjectContactOfUnoControl::ensureControlVisibility( bool _bVisible ) const { - VOCGuard aGuard( *m_pImpl ); + SolarMutexGuard aSolarGuard; try { @@ -1801,7 +1774,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void ViewObjectContactOfUnoControl::setControlDesignMode( bool _bDesignMode ) const { - VOCGuard aGuard( *m_pImpl ); + SolarMutexGuard aSolarGuard; m_pImpl->setControlDesignMode( _bDesignMode ); if(!_bDesignMode) @@ -1839,7 +1812,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- bool ViewObjectContactOfUnoControl::isPrimitiveVisible( const DisplayInfo& _rDisplayInfo ) const { - VOCGuard aGuard( *m_pImpl ); + SolarMutexGuard aSolarGuard; if ( m_pImpl->hasControl() ) { commit 86a2270f856244e85b3fb91792fd936d793852ff Author: Michael Stahl <mst...@redhat.com> Date: Tue Oct 18 17:27:32 2011 +0200 gb_Library_set_componentfile: depend from workdir The dependecy from the outdir lib to the component file is racy, because we preserve timestamps when delivering: if the component file and the workdir library are built in parallel, and the component file ends up being newer, then the library will always be delivered because its timestamp is always older. Work around this by having the workdir library depend on the component file. diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk index 10bee87..39afc5a 100644 --- a/solenv/gbuild/Library.mk +++ b/solenv/gbuild/Library.mk @@ -80,7 +80,9 @@ endef define gb_Library_set_componentfile $(call gb_ComponentTarget_ComponentTarget,$(or $(strip $(3)),$(strip $(2))),$(call gb_Library__get_componentprefix,$(1)),\ $(call gb_Library_get_runtime_filename,$(if $(MERGELIBS),$(if $(filter $(gb_MERGED_LIBS),$(1)),merged,$(1)),$(1))),$(2)) -$(call gb_Library_get_target,$(1)) : $(call gb_ComponentTarget_get_outdir_target,$(2)) $(call gb_ComponentTarget_get_outdir_inbuild_target,$(2)) +$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktargetname,$(1))) : \ + $(call gb_ComponentTarget_get_outdir_target,$(2)) \ + $(call gb_ComponentTarget_get_outdir_inbuild_target,$(2)) $(call gb_Library_get_clean_target,$(1)) : $(call gb_ComponentTarget_get_clean_target,$(or $(strip $(3)),$(strip $(2)))) endef commit 72acea9f28f1d4975c2e7149963e61a3901ec590 Author: Michael Stahl <mst...@redhat.com> Date: Fri Oct 14 22:32:12 2011 +0200 gbuild: mkdir when creating dependencies diff --git a/solenv/gbuild/platform/ios.mk b/solenv/gbuild/platform/ios.mk index 8e260d1..664af6e 100644 --- a/solenv/gbuild/platform/ios.mk +++ b/solenv/gbuild/platform/ios.mk @@ -417,6 +417,7 @@ gb_SrsPartTarget_RSCCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib SOLARBI define gb_SrsPartTarget__command_dep $(call gb_Helper_abbreviate_dirs,\ + mkdir -p $(dir $(call gb_SrsPartTarget_get_dep_target,$(1))) && \ $(gb_GCCP) \ -MM -MT $(call gb_SrsPartTarget_get_target,$(1)) \ $(INCLUDE) \ diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index 9cf0c87..4113d5e 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -510,6 +510,7 @@ gb_SrsPartTarget_RSCCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUT define gb_SrsPartTarget__command_dep $(call gb_Helper_abbreviate_dirs,\ + mkdir -p $(dir $(call gb_SrsPartTarget_get_dep_target,$(1))) && \ $(gb_GCCP) \ -MM -MT $(call gb_SrsPartTarget_get_target,$(1)) \ $(INCLUDE) \ diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index baa71bd..23077cb 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -500,6 +500,7 @@ gb_SrsPartTarget_RSCCOMMAND := LD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib SOLARBIND define gb_SrsPartTarget__command_dep $(call gb_Helper_abbreviate_dirs,\ + mkdir -p $(dir $(call gb_SrsPartTarget_get_dep_target,$(1))) && \ $(gb_GCCP) \ -MM -MT $(call gb_SrsPartTarget_get_target,$(1)) \ $(INCLUDE) \ commit e2934c43102eb6e6f46b238276fbe3b0274699a8 Author: Michael Stahl <mst...@redhat.com> Date: Fri Oct 14 22:31:03 2011 +0200 sal: workaround warnings in valgrind macros diff --git a/sal/rtl/source/alloc_impl.h b/sal/rtl/source/alloc_impl.h index 5e68edb..39bbbf6 100644 --- a/sal/rtl/source/alloc_impl.h +++ b/sal/rtl/source/alloc_impl.h @@ -260,6 +260,13 @@ typedef CRITICAL_SECTION rtl_memory_lock_type; #define VALGRIND_MEMPOOL_FREE(pool, addr) #elif defined(HAVE_MEMCHECK_H) #include <memcheck.h> +/* valgrind macros contain unused variables... */ +#define GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) +#if GCC_VERSION >= 40201 +#pragma GCC diagnostic warning "-Wunused-but-set-variable" +#endif #endif /* NVALGRIND || HAVE_MEMCHECK_H */ typedef enum { AMode_CUSTOM, AMode_SYSTEM, AMode_UNSET } AllocMode; commit fa70d98e729c0dba44e1c8e25fe1323bad918945 Author: Michael Stahl <mst...@redhat.com> Date: Fri Oct 14 11:07:54 2011 +0200 moz: replace Linux 3.0 workaround with one for 3.x diff --git a/moz/makefile.mk b/moz/makefile.mk index 15480f5..020fa69 100644 --- a/moz/makefile.mk +++ b/moz/makefile.mk @@ -96,7 +96,9 @@ PATCH_FILES = \ patches/brokenmakefile.patch \ patches/aix_build_fix.patch \ patches/libpr0n_build_fix.patch \ - patches/macosx_build_fix.patch + patches/macosx_build_fix.patch \ + patches/nss-linux3.patch \ + # This file is needed for the W32 build when BUILD_MOZAB is set # (currently only vc8/vs2005 is supported when BUILD_MOZAB is set) diff --git a/moz/patches/nss-linux3.patch b/moz/patches/nss-linux3.patch new file mode 100644 index 0000000..b735669 --- /dev/null +++ b/moz/patches/nss-linux3.patch @@ -0,0 +1,13 @@ +--- misc/mozilla/security/coreconf/arch.mk 2011-10-06 19:58:31.808695724 +0200 ++++ misc/build/mozilla/security/coreconf/arch.mk 2011-10-06 19:58:00.074648943 +0200 +@@ -152,6 +152,10 @@ + + ifeq ($(OS_ARCH),Linux) + OS_RELEASE := $(subst ., ,$(OS_RELEASE)) ++ # force Linux 3.x to 2.6 ++ ifeq ($(word 1,$(OS_RELEASE)),3) ++ OS_RELEASE := 2 6 ++ endif + ifneq ($(words $(OS_RELEASE)),1) + OS_RELEASE := $(word 1,$(OS_RELEASE)).$(word 2,$(OS_RELEASE)) + endif diff --git a/moz/seamonkey-source-1.1.14.patch b/moz/seamonkey-source-1.1.14.patch index 248ee65..eb602e6 100644 --- a/moz/seamonkey-source-1.1.14.patch +++ b/moz/seamonkey-source-1.1.14.patch @@ -6336,22 +6336,6 @@ clean clobber:: rm -rf $(DIST)/$(APP_NAME).app ---- /dev/null 2011-07-24 19:07:44.290563140 +0200 -+++ misc/build/mozilla/security/coreconf/Linux3.0.mk 2011-07-24 22:21:02.710513995 +0200 -@@ -0,0 +1,13 @@ -+include $(CORE_DEPTH)/coreconf/Linux.mk -+ -+DSO_LDOPTS += -Wl,-z,defs -+ -+OS_REL_CFLAGS += -DLINUX2_1 -+MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) -+ -+ifdef MAPFILE -+ MKSHLIB += -Wl,--version-script,$(MAPFILE) -+endif -+PROCESS_MAP_FILE = grep -v ';-' $< | \ -+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ -+ --- misc/mozilla/directory/c-sdk/ldap/libraries/libiutil/Makefile.in 2006-02-03 15:44:41.000000000 +0100 +++ misc/build/mozilla/directory/c-sdk/ldap/libraries/libiutil/Makefile.in 2011-09-07 10:45:16.000000000 +0200 @@ -89,12 +89,9 @@ _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits