This should be fixed now, and I have added a small test in 
test/unit/test_static_context.cpp

> I have done some testing of this branch. If merged into Sausalito, I get an
> assertion failure if a function is disabled in the static context. The
> assertion fails while trying to serialize a disabled function.
> 
> (gdb) where
> #0  0xb4c600e5 in __cxa_throw () from /usr/lib/i386-linux-gnu/libstdc++.so.6
> #1  0xb6fee1ca in zorba::assertion_failed (condition=0xb791ec8f
> "!isBuiltin()", file=0xb791ec44
> "/home/mbrantner/sausalito/sandbox/runtime/zorba/src/functions/function.cpp",
> line=68, msg=0x0)
>     at
> /home/mbrantner/sausalito/sandbox/runtime/zorba/src/diagnostics/assert.cpp:72
> #2  0xb7178693 in zorba::function::serialize (this=0x810e4e0, ar=...) at
> /home/mbrantner/sausalito/sandbox/runtime/zorba/src/functions/function.cpp:68
> #3  0xb717857e in zorba::function::serialize_internal (this=0x810e4e0, ar=...)
> at
> /home/mbrantner/sausalito/sandbox/runtime/zorba/src/functions/function.cpp:54
> #4  0xb6fbd5e6 in zorba::serialization::operator&<zorba::function> (ar=...,
> obj=@0xbfffe82c) at /home/mbrantner/sausalito/sandbox/runtime/zorba/src/zorbas
> erialization/serialize_template_types.h:139
> #5  0xb6fb4422 in zorba::serialization::operator&<zorba::function> (ar=...,
> obj=...) at /home/mbrantner/sausalito/sandbox/runtime/zorba/src/zorbaserializa
> tion/serialize_template_types.h:268
> #6  0xb6fa6923 in zorba::FunctionInfo::serialize (this=0x81459e8, ar=...) at /
> home/mbrantner/sausalito/sandbox/runtime/zorba/src/context/static_context.cpp:
> 163
> #7  0xb6fa6588 in zorba::FunctionInfo::serialize_internal (this=0x81459e8,
> ar=...) at /home/mbrantner/sausalito/sandbox/runtime/zorba/src/context/static_
> context.cpp:95
> #8  0xb6fc06e2 in zorba::serialization::operator&<zorba::FunctionInfo>
> (ar=..., obj=...) at /home/mbrantner/sausalito/sandbox/runtime/zorba/src/zorba
> serialization/serialize_template_types.h:85
> #9  0xb6fb774f in zorba::serialization::operator&<zorba::store::Item*,
> zorba::FunctionInfo, zorba::HashMapItemPointerCmp> (ar=..., obj=@0x8131394)
>     at /home/mbrantner/sausalito/sandbox/runtime/zorba/src/zorbaserialization/
> serialize_template_types.h:763
> #10 0xb6fa93ad in zorba::static_context::serialize (this=0x8131308, ar=...) at
> /home/mbrantner/sausalito/sandbox/runtime/zorba/src/context/static_context.cpp
> :982
> #11 0xb6fa663c in zorba::static_context::serialize_internal (this=0x8131308,
> ar=...) at /home/mbrantner/sausalito/sandbox/runtime/zorba/src/context/static_
> context.cpp:101
> #12 0xb6ccfe29 in zorba::serialization::operator&<zorba::static_context>
> (ar=..., obj=@0xbfffec3c) at /home/mbrantner/sausalito/sandbox/runtime/zorba/s
> rc/zorbaserialization/serialize_template_types.h:139
> #13 0xb6ccd41f in zorba::serialization::operator&<zorba::static_context>
> (ar=..., obj=...) at /home/mbrantner/sausalito/sandbox/runtime/zorba/src/zorba
> serialization/serialize_template_types.h:268
> #14 0xb6f19b85 in zorba::serialization::operator&<unsigned int,
> zorba::rchandle<zorba::static_context>, std::less<unsigned int> > (ar=...,
> obj=...)
>     at /home/mbrantner/sausalito/sandbox/runtime/zorba/src/zorbaserialization/
> serialize_template_types.h:636
> #15 0xb6f19609 in zorba::CompilerCB::serialize (this=0x8131680, ar=...) at /ho
> me/mbrantner/sausalito/sandbox/runtime/zorba/src/compiler/api/compilercb.cpp:1
> 88
> #16 0xb6f18ee2 in zorba::CompilerCB::serialize_internal (this=0x8131680,
> ar=...) at /home/mbrantner/sausalito/sandbox/runtime/zorba/src/compiler/api/co
> mpilercb.cpp:36
> #17 0xb6cccb98 in zorba::serialization::operator&<zorba::CompilerCB> (ar=...,
> obj=@0x8149d14) at /home/mbrantner/sausalito/sandbox/runtime/zorba/src/zorbase
> rialization/serialize_template_types.h:139
> #18 0xb6cc6343 in zorba::XQueryImpl::serialize (this=0x8149cf8, ar=...) at
> /home/mbrantner/sausalito/sandbox/runtime/zorba/src/api/xqueryimpl.cpp:200
> #19 0xb6cc8f47 in zorba::XQueryImpl::saveExecutionPlan (this=0x8149cf8,
> os=..., archive_format=ZORBA_USE_BINARY_ARCHIVE,
> save_options=SAVE_UNUSED_FUNCTIONS) at
> /home/mbrantner/sausalito/sandbox/runtime/zorba/src/api/xqueryimpl.cpp:940
> 
> I'm not sure if the problem still exists because disabling of functions has
> been changed in the Zorba trunk.
-- 
https://code.launchpad.net/~zorba-coders/zorba/no-expr-serialization/+merge/104856
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to