Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


I think the problem is, that without resize the hash map could be
overfilled.

I did fix this like commit 6ecdae26517b89ee670.

Think problem is like in PspKernInfo::Initialize() [in
vcl/unx/source/gdi/salgdi3.cxx]:

maUnicodeKernPairs.insert( aKernPair );

maUnicodeKernPairs is boost::unordered_map  and rKernPairs is std::list.
Is it clean to do this?! And: If we don't resize maUnicodeKernPairs to
the size of aKernPair, could we run out of memory - this would be the
case for all of them?

Thomas

On 02/04/2011 08:17 PM, Caolán McNamara wrote:
On Fri, 2011-02-04 at 06:41 -0700, Tor Lillqvist wrote:
And after a while of dismissing these, saxparser goes into an infinite loop.

For me, saxparser crashes... I am debugging that but not really getting much wiser.

does this patch, to revert a hash_map -> unordered_map make it "go away"

C.



_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx
index 0b1dcbb..ac38d23 100644
--- a/vcl/source/gdi/configsettings.cxx
+++ b/vcl/source/gdi/configsettings.cxx
@@ -134,7 +134,6 @@ void SettingsConfigItem::getValues()
     m_aSettings.clear();
 
     Sequence< OUString > aNames( GetNodeNames( OUString() ) );
-    m_aSettings.resize( aNames.getLength() );
 
     for( int j = 0; j < aNames.getLength(); j++ )
     {
diff --git a/vcl/unx/headless/svptext.cxx b/vcl/unx/headless/svptext.cxx
index 8701a7f..1523241 100644
--- a/vcl/unx/headless/svptext.cxx
+++ b/vcl/unx/headless/svptext.cxx
@@ -194,7 +194,6 @@ void PspKernInfo::Initialize() const
         return;
 
     // feed psprint's kerning list into a lookup-friendly container
-    maUnicodeKernPairs.resize( rKernPairs.size() );
     PspKernPairs::const_iterator it = rKernPairs.begin();
     for(; it != rKernPairs.end(); ++it )
     {
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index d3718f5..50283ff 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -523,7 +523,6 @@ void PspKernInfo::Initialize() const
         return;
 
     // feed psprint's kerning list into a lookup-friendly container
-    maUnicodeKernPairs.resize( rKernPairs.size() );
     PspKernPairs::const_iterator it = rKernPairs.begin();
     for(; it != rKernPairs.end(); ++it )
     {

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.