So,
Trying to unwind why the linux tinderboxen seem to like to crash during
build of udkapi - it seemed (to me) that there was some horrible stack
corruption going on - which valgrind simply can't see. Re-building with
the attached makes the problem go away for me (even more annoying) -
though valgrind shows nothing; so (assuming I'm right) I guess I'm just
moving objects away from the stack corruption onto the heap (so we
survive) but not finding the underlying problem.
Annoying; I guess a H/W watchpoint is needed; but ... anyhow - bit
tired for that.
HTH,
Michael.
--
michael.meeks@suse.com <><, Pseudo Engineer, itinerant idiot
diff --git a/codemaker/inc/codemaker/dependencies.hxx b/codemaker/inc/codemaker/dependencies.hxx
index b46e7f3..2e4e0f5 100644
--- a/codemaker/inc/codemaker/dependencies.hxx
+++ b/codemaker/inc/codemaker/dependencies.hxx
@@ -116,7 +116,7 @@ private:
void insert(rtl::OString const & type, bool base);
- Map m_map;
+ Map &m_map;
bool m_valid;
bool m_voidDependency;
bool m_booleanDependency;
diff --git a/codemaker/inc/codemaker/options.hxx b/codemaker/inc/codemaker/options.hxx
index 22b09ce..bd2acd8 100644
--- a/codemaker/inc/codemaker/options.hxx
+++ b/codemaker/inc/codemaker/options.hxx
@@ -64,10 +64,10 @@ public:
inline const StringVector& getExtraInputFiles() const
{ return m_extra_input_files; }
protected:
- ::rtl::OString m_program;
- StringVector m_inputFiles;
- StringVector m_extra_input_files;
- OptionMap m_options;
+ ::rtl::OString &m_program;
+ StringVector &m_inputFiles;
+ StringVector &m_extra_input_files;
+ OptionMap &m_options;
};
#endif // INCLUDED_CODEMAKER_OPTIONS_HXX
diff --git a/codemaker/source/codemaker/dependencies.cxx
b/codemaker/source/codemaker/dependencies.cxx
index 9d2e769..74a71f8 100644
--- a/codemaker/source/codemaker/dependencies.cxx
+++ b/codemaker/source/codemaker/dependencies.cxx
@@ -43,6 +43,7 @@ struct Bad {};
Dependencies::Dependencies(
TypeManager const & manager, rtl::OString const & type):
+ m_map(*(new Map())),
m_voidDependency(false), m_booleanDependency(false),
m_byteDependency(false), m_shortDependency(false),
m_unsignedShortDependency(false), m_longDependency(false),
@@ -120,7 +121,9 @@ Dependencies::Dependencies(
}
Dependencies::~Dependencies()
-{}
+{
+ delete &m_map;
+}
void Dependencies::insert(rtl::OUString const & type, bool base) {
rtl::OString t;
diff --git a/codemaker/source/codemaker/options.cxx b/codemaker/source/codemaker/options.cxx
index 59706d9..e2bbac2 100644
--- a/codemaker/source/codemaker/options.cxx
+++ b/codemaker/source/codemaker/options.cxx
@@ -22,13 +22,20 @@
using ::rtl::OString;
-Options::Options()
+Options::Options() :
+ m_program(*(new ::rtl::OString())),
+ m_inputFiles(*(new StringVector())),
+ m_extra_input_files(*(new StringVector())),
+ m_options(*(new OptionMap()))
{
}
Options::~Options()
{
-
+ delete &m_program;
+ delete &m_inputFiles;
+ delete &m_extra_input_files;
+ delete &m_options;
}
const OString& Options::getProgramName() const
diff --git a/codemaker/source/cppumaker/cppumaker.cxx b/codemaker/source/cppumaker/cppumaker.cxx
index c3aee2a..69c1fd0 100644
--- a/codemaker/source/cppumaker/cppumaker.cxx
+++ b/codemaker/source/cppumaker/cppumaker.cxx
@@ -141,7 +141,7 @@ void produceAllTypes(const OString& typeName,
SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
{
- CppuOptions options;
+ CppuOptions &options = *(new CppuOptions());
try
{
@@ -156,7 +156,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
exit(99);
}
- RegistryTypeManager typeMgr;
+ RegistryTypeManager &typeMgr = *(new RegistryTypeManager());
if (!typeMgr.init(options.getInputFiles(), options.getExtraInputFiles()))
{
@@ -169,7 +169,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
typeMgr.setBase(options.getOption("-B"));
}
- codemaker::GeneratedTypeSet generated;
+ codemaker::GeneratedTypeSet &generated = *(new codemaker::GeneratedTypeSet());
try
{
if (options.isValid("-T"))
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index eca0143..bb276af 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -159,7 +159,7 @@ CppuType::CppuType(typereg::Reader& typeReader,
, m_name(typeName.copy(typeName.lastIndexOf('/') + 1))
, m_reader(typeReader)
, m_typeMgr(typeMgr)
- , m_dependencies(typeMgr, typeName)
+ , m_dependencies(*(new codemaker::Dependencies(typeMgr, typeName)))
{}
CppuType::~CppuType()
@@ -4438,10 +4438,11 @@ bool produceType(RegistryKey& rTypeKey, bool bIsExtraType,
{
case RT_TYPE_INTERFACE:
{
- InterfaceType iType(reader, typeName, typeMgr);
+ InterfaceType &iType = *(new InterfaceType(reader, typeName, typeMgr));
ret = iType.dump(pOptions);
if (ret) generated.add(typeName);
iType.dumpDependedTypes(generated, pOptions);
+ delete &iType;
}
break;
case RT_TYPE_MODULE:
diff --git a/codemaker/source/cppumaker/cpputype.hxx b/codemaker/source/cppumaker/cpputype.hxx
index a2781cb..303da20 100644
--- a/codemaker/source/cppumaker/cpputype.hxx
+++ b/codemaker/source/cppumaker/cpputype.hxx
@@ -145,7 +145,7 @@ protected:
::rtl::OString m_name;
typereg::Reader m_reader;
TypeManager const & m_typeMgr;
- codemaker::Dependencies m_dependencies;
+ codemaker::Dependencies &m_dependencies;
private:
void addGetCppuTypeIncludes(codemaker::cppumaker::Includes & includes)
Context
- cppumaker crash ... · Michael Meeks
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.