Hi,
I'm running into a problem with the tuscany_sdo_test from the SVN head,
which fails for me on Linux with the following error:
I/O warning : failed to load external entity "not_present.xsd"
I/O warning : failed to load external entity "not-present.xml"
I/O warning : failed to load external entity "sca-policy.xsd"
I/O warning : failed to load external entity "sca-policy.xsd"
I/O warning : failed to load external entity "sca-policy.xsd"
I/O warning : failed to load external entity "sca-policy.xsd"
I/O warning : failed to load external entity "sca-policy.xsd"
I/O warning : failed to load external entity "sca-policy.xsd"
I/O warning : failed to load external entity "sca-policy.xsd"
I/O warning : failed to load external entity "sca-policy.xsd"
I/O warning : failed to load external entity "sca-policy.xsd"
terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
Aborted
The problem only occurs on Linux. Line 3144 of TypeImpl.cpp tries to
allocate an array and the length is not initialized / high value. This
code is in an #ifdef !Windows, so the problem doesn't occur on Windows.
Here's the stack trace:
Thread [1] (Suspended: Signal 'SIGABRT' received. Description: Aborted.)
15 _dl_sysinfo_int80() 0x0085f7a2
14 raise() 0x0089f7f5
13 abort() 0x008a1199
12 __gnu_cxx::__verbose_terminate_handler() 0x0049125b
11 __cxa_call_unexpected() 0x0048ef71
10 std::terminate() 0x0048efa6
9 __cxa_throw() 0x0048f0ef
8 operator new() 0x0048f53c
7 operator new[]() 0x0048f5d9
6 commonj::sdo::TypeImpl::convertToInteger() at TypeImpl.cpp:3144 0xb7fc6b49
5 commonj::sdo::Setting::getIntegerValue() at Setting.cpp:234 0xb7fc119c
4 sdotest::printOldValues() at utils.cpp:73 0x0807c6a2
3 sdotest::dumpchangesummary() at utils.cpp:416 0x0807cca4
2 sdotest::setnull() at sdotest.cpp:5998 0x080635fd
1 main() at main.cpp:120 0x0807d2bb
I spent some time debugging it... and found the issue in
ChangeSummaryImpl.cpp, easy to fix by initializing a len local variable
to 0. Here's the patch:
Index: ChangeSummaryImpl.cpp
===================================================================
--- ChangeSummaryImpl.cpp (revision 422962)
+++ ChangeSummaryImpl.cpp (working copy)
@@ -756,7 +756,7 @@
CREATELOG_MAP::iterator createLogIter;
- unsigned int len;
+ unsigned int len = 0;
createLogIter = createdMap.find(ob);
if (createLogIter != createdMap.end())
With this patch tuscany_sdo_test successfully runs for me.
Hope this helps...
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]