I just tried it on Ubuntu again and got the same error:
*** Error in `bin/zorba': free(): corrupted unsorted chunks: 0x0934e278 ***
Here's the complete cmake call I used:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-O2 -g" -DCMAKE_CXX_FLAGS="-O2 -g" -DCMAKE_CXX_FLAGS_RELEASE='-DNDEBUG' -DCMAKE_C_FLAGS_RELEASE='-DNDEBUG' ..
The error occurs with query file test/rbkt/Queries/zorba/schemas/val-inplace2.xq, for example. "make doc" fails in my Ubuntu environment too (same error as mentioned above).
$ valgrind ./zorba ../../test/rbkt/Queries/zorba/schemas/val-inplace2.xq
==30909== Memcheck, a memory error detector
==30909== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==30909== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==30909== Command: ./zorba ../../test/rbkt/Queries/zorba/schemas/val-inplace2.xq
==30909==
<?xml version="1.0" encoding="UTF-8"?>
==30909== Invalid read of size 4
==30909== at 0x492E873: zorba::store::Item::removeReference() (item.cpp:109)
==30909== by 0x46E08CC: zorba::NoaryBaseIterator<zorba::ForVarIterator, zorba::ForVarState>::closeImpl(zorba::PlanState&) (item_handle.h:62)
==30909== by 0x467CE43: zorba::UnaryBaseIterator<zorba::ApplyIterator, zorba::ApplyIteratorState>::closeImpl(zorba::PlanState&) (plan_iterator.h:450)
==30909== by 0x4763CEF: zorba::TransformIterator::closeImpl(zorba::PlanState&) (plan_iterator.h:450)
==30909== by 0x466CFA6: zorba::PlanWrapper::close() (plan_iterator.h:450)
==30909== by 0x4137FDE: zorba::XQueryImpl::dispose(zorba::rchandle<zorba::PlanWrapper> const&) (xqueryimpl.cpp:726)
==30909== by 0x413D7CE: zorba::XQueryImpl::execute(std::ostream&, Zorba_SerializerOptions const*) (xqueryimpl.cpp:1145)
==30909== by 0x8057F35: compileAndExecute(zorba::Zorba*, zorba::SmartPtr<zorba::StaticContext>&, std::string const&, std::istream&, std::ostream&, Timers&) (zorbacmd.cpp:525)
==30909== by 0x804D65A: main (zorbacmd.cpp:824)
==30909== Address 0x75b2990 is 8 bytes inside a block of size 216 free'd
==30909== at 0x402B838: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==30909== by 0x49B4011: zorba::simplestore::PULImpl::~PULImpl() (simple_pul.cpp:152)
==30909== by 0x492E5D3: zorba::store::Item::free() (item.cpp:49)
==30909== by 0x492E8B6: zorba::store::Item::removeReference() (item.cpp:211)
==30909== by 0x46E08CC: zorba::NoaryBaseIterator<zorba::ForVarIterator, zorba::ForVarState>::closeImpl(zorba::PlanState&) (item_handle.h:62)
==30909== by 0x4763CDF: zorba::TransformIterator::closeImpl(zorba::PlanState&) (plan_iterator.h:450)
==30909== by 0x466CFA6: zorba::PlanWrapper::close() (plan_iterator.h:450)
==30909== by 0x4137FDE: zorba::XQueryImpl::dispose(zorba::rchandle<zorba::PlanWrapper> const&) (xqueryimpl.cpp:726)
==30909== by 0x413D7CE: zorba::XQueryImpl::execute(std::ostream&, Zorba_SerializerOptions const*) (xqueryimpl.cpp:1145)
==30909== by 0x8057F35: compileAndExecute(zorba::Zorba*, zorba::SmartPtr<zorba::StaticContext>&, std::string const&, std::istream&, std::ostream&, Timers&) (zorbacmd.cpp:525)
==30909== by 0x804D65A: main (zorbacmd.cpp:824)
==30909==
==30909== Invalid read of size 4
==30909== at 0x492E8A8: zorba::store::Item::removeReference() (item.cpp:210)
==30909== by 0x46E08CC: zorba::NoaryBaseIterator<zorba::ForVarIterator, zorba::ForVarState>::closeImpl(zorba::PlanState&) (item_handle.h:62)
==30909== by 0x467CE43: zorba::UnaryBaseIterator<zorba::ApplyIterator, zorba::ApplyIteratorState>::closeImpl(zorba::PlanState&) (plan_iterator.h:450)
==30909== by 0x4763CEF: zorba::TransformIterator::closeImpl(zorba::PlanState&) (plan_iterator.h:450)
==30909== by 0x466CFA6: zorba::PlanWrapper::close() (plan_iterator.h:450)
==30909== by 0x4137FDE: zorba::XQueryImpl::dispose(zorba::rchandle<zorba::PlanWrapper> const&) (xqueryimpl.cpp:726)
==30909== by 0x413D7CE: zorba::XQueryImpl::execute(std::ostream&, Zorba_SerializerOptions const*) (xqueryimpl.cpp:1145)
==30909== by 0x8057F35: compileAndExecute(zorba::Zorba*, zorba::SmartPtr<zorba::StaticContext>&, std::string const&, std::istream&, std::ostream&, Timers&) (zorbacmd.cpp:525)
==30909== by 0x804D65A: main (zorbacmd.cpp:824)
==30909== Address 0x75b298c is 4 bytes inside a block of size 216 free'd
==30909== at 0x402B838: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==30909== by 0x49B4011: zorba::simplestore::PULImpl::~PULImpl() (simple_pul.cpp:152)
==30909== by 0x492E5D3: zorba::store::Item::free() (item.cpp:49)
==30909== by 0x492E8B6: zorba::store::Item::removeReference() (item.cpp:211)
==30909== by 0x46E08CC: zorba::NoaryBaseIterator<zorba::ForVarIterator, zorba::ForVarState>::closeImpl(zorba::PlanState&) (item_handle.h:62)
==30909== by 0x4763CDF: zorba::TransformIterator::closeImpl(zorba::PlanState&) (plan_iterator.h:450)
==30909== by 0x466CFA6: zorba::PlanWrapper::close() (plan_iterator.h:450)
==30909== by 0x4137FDE: zorba::XQueryImpl::dispose(zorba::rchandle<zorba::PlanWrapper> const&) (xqueryimpl.cpp:726)
==30909== by 0x413D7CE: zorba::XQueryImpl::execute(std::ostream&, Zorba_SerializerOptions const*) (xqueryimpl.cpp:1145)
==30909== by 0x8057F35: compileAndExecute(zorba::Zorba*, zorba::SmartPtr<zorba::StaticContext>&, std::string const&, std::istream&, std::ostream&, Timers&) (zorbacmd.cpp:525)
==30909== by 0x804D65A: main (zorbacmd.cpp:824)
==30909==
DDType==30909==
==30909== HEAP SUMMARY:
==30909== in use at exit: 0 bytes in 0 blocks
==30909== total heap usage: 15,125 allocs, 15,125 frees, 5,212,412 bytes allocated
==30909==
==30909== All heap blocks were freed -- no leaks are possible
==30909==
==30909== For counts of detected and suppressed errors, rerun with: -v
==30909== ERROR SUMMARY: 3 errors from 2 contexts (suppressed: 0 from 0)
I just tried it on Ubuntu again and got the same error:
*** Error in `bin/zorba': free(): corrupted unsorted chunks: 0x0934e278 ***
Here's the complete cmake call I used: BUILD_TYPE= Release -DCMAKE_ C_FLAGS= "-O2 -g" -DCMAKE_ CXX_FLAGS= "-O2 -g" -DCMAKE_ CXX_FLAGS_ RELEASE= '-DNDEBUG' -DCMAKE_ C_FLAGS_ RELEASE= '-DNDEBUG' ..
cmake -DCMAKE_
The error occurs with query file test/rbkt/ Queries/ zorba/schemas/ val-inplace2. xq, for example. "make doc" fails in my Ubuntu environment too (same error as mentioned above).
$ valgrind ./zorba ../../test/ rbkt/Queries/ zorba/schemas/ val-inplace2. xq rbkt/Queries/ zorba/schemas/ val-inplace2. xq store:: Item::removeRef erence( ) (item.cpp:109) NoaryBaseIterat or<zorba: :ForVarIterator , zorba:: ForVarState> ::closeImpl( zorba:: PlanState& ) (item_handle.h:62) UnaryBaseIterat or<zorba: :ApplyIterator, zorba:: ApplyIteratorSt ate>::closeImpl (zorba: :PlanState& ) (plan_iterator. h:450) TransformIterat or::closeImpl( zorba:: PlanState& ) (plan_iterator. h:450) PlanWrapper: :close( ) (plan_iterator. h:450) XQueryImpl: :dispose( zorba:: rchandle< zorba:: PlanWrapper> const&) (xqueryimpl. cpp:726) XQueryImpl: :execute( std::ostream& , Zorba_Serialize rOptions const*) (xqueryimpl. cpp:1145) te(zorba: :Zorba* , zorba:: SmartPtr< zorba:: StaticContext> &, std::string const&, std::istream&, std::ostream&, Timers&) (zorbacmd.cpp:525) valgrind/ vgpreload_ memcheck- x86-linux. so) simplestore: :PULImpl: :~PULImpl( ) (simple_ pul.cpp: 152) store:: Item::free( ) (item.cpp:49) store:: Item::removeRef erence( ) (item.cpp:211) NoaryBaseIterat or<zorba: :ForVarIterator , zorba:: ForVarState> ::closeImpl( zorba:: PlanState& ) (item_handle.h:62) TransformIterat or::closeImpl( zorba:: PlanState& ) (plan_iterator. h:450) PlanWrapper: :close( ) (plan_iterator. h:450) XQueryImpl: :dispose( zorba:: rchandle< zorba:: PlanWrapper> const&) (xqueryimpl. cpp:726) XQueryImpl: :execute( std::ostream& , Zorba_Serialize rOptions const*) (xqueryimpl. cpp:1145) te(zorba: :Zorba* , zorba:: SmartPtr< zorba:: StaticContext> &, std::string const&, std::istream&, std::ostream&, Timers&) (zorbacmd.cpp:525) store:: Item::removeRef erence( ) (item.cpp:210) NoaryBaseIterat or<zorba: :ForVarIterator , zorba:: ForVarState> ::closeImpl( zorba:: PlanState& ) (item_handle.h:62) UnaryBaseIterat or<zorba: :ApplyIterator, zorba:: ApplyIteratorSt ate>::closeImpl (zorba: :PlanState& ) (plan_iterator. h:450) TransformIterat or::closeImpl( zorba:: PlanState& ) (plan_iterator. h:450) PlanWrapper: :close( ) (plan_iterator. h:450) XQueryImpl: :dispose( zorba:: rchandle< zorba:: PlanWrapper> const&) (xqueryimpl. cpp:726) XQueryImpl: :execute( std::ostream& , Zorba_Serialize rOptions const*) (xqueryimpl. cpp:1145) te(zorba: :Zorba* , zorba:: SmartPtr< zorba:: StaticContext> &, std::string const&, std::istream&, std::ostream&, Timers&) (zorbacmd.cpp:525) valgrind/ vgpreload_ memcheck- x86-linux. so) simplestore: :PULImpl: :~PULImpl( ) (simple_ pul.cpp: 152) store:: Item::free( ) (item.cpp:49) store:: Item::removeRef erence( ) (item.cpp:211) NoaryBaseIterat or<zorba: :ForVarIterator , zorba:: ForVarState> ::closeImpl( zorba:: PlanState& ) (item_handle.h:62) TransformIterat or::closeImpl( zorba:: PlanState& ) (plan_iterator. h:450) PlanWrapper: :close( ) (plan_iterator. h:450) XQueryImpl: :dispose( zorba:: rchandle< zorba:: PlanWrapper> const&) (xqueryimpl. cpp:726) XQueryImpl: :execute( std::ostream& , Zorba_Serialize rOptions const*) (xqueryimpl. cpp:1145) te(zorba: :Zorba* , zorba:: SmartPtr< zorba:: StaticContext> &, std::string const&, std::istream&, std::ostream&, Timers&) (zorbacmd.cpp:525)
==30909== Memcheck, a memory error detector
==30909== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==30909== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==30909== Command: ./zorba ../../test/
==30909==
<?xml version="1.0" encoding="UTF-8"?>
==30909== Invalid read of size 4
==30909== at 0x492E873: zorba::
==30909== by 0x46E08CC: zorba::
==30909== by 0x467CE43: zorba::
==30909== by 0x4763CEF: zorba::
==30909== by 0x466CFA6: zorba::
==30909== by 0x4137FDE: zorba::
==30909== by 0x413D7CE: zorba::
==30909== by 0x8057F35: compileAndExecu
==30909== by 0x804D65A: main (zorbacmd.cpp:824)
==30909== Address 0x75b2990 is 8 bytes inside a block of size 216 free'd
==30909== at 0x402B838: operator delete(void*) (in /usr/lib/
==30909== by 0x49B4011: zorba::
==30909== by 0x492E5D3: zorba::
==30909== by 0x492E8B6: zorba::
==30909== by 0x46E08CC: zorba::
==30909== by 0x4763CDF: zorba::
==30909== by 0x466CFA6: zorba::
==30909== by 0x4137FDE: zorba::
==30909== by 0x413D7CE: zorba::
==30909== by 0x8057F35: compileAndExecu
==30909== by 0x804D65A: main (zorbacmd.cpp:824)
==30909==
==30909== Invalid read of size 4
==30909== at 0x492E8A8: zorba::
==30909== by 0x46E08CC: zorba::
==30909== by 0x467CE43: zorba::
==30909== by 0x4763CEF: zorba::
==30909== by 0x466CFA6: zorba::
==30909== by 0x4137FDE: zorba::
==30909== by 0x413D7CE: zorba::
==30909== by 0x8057F35: compileAndExecu
==30909== by 0x804D65A: main (zorbacmd.cpp:824)
==30909== Address 0x75b298c is 4 bytes inside a block of size 216 free'd
==30909== at 0x402B838: operator delete(void*) (in /usr/lib/
==30909== by 0x49B4011: zorba::
==30909== by 0x492E5D3: zorba::
==30909== by 0x492E8B6: zorba::
==30909== by 0x46E08CC: zorba::
==30909== by 0x4763CDF: zorba::
==30909== by 0x466CFA6: zorba::
==30909== by 0x4137FDE: zorba::
==30909== by 0x413D7CE: zorba::
==30909== by 0x8057F35: compileAndExecu
==30909== by 0x804D65A: main (zorbacmd.cpp:824)
==30909==
DDType==30909==
==30909== HEAP SUMMARY:
==30909== in use at exit: 0 bytes in 0 blocks
==30909== total heap usage: 15,125 allocs, 15,125 frees, 5,212,412 bytes allocated
==30909==
==30909== All heap blocks were freed -- no leaks are possible
==30909==
==30909== For counts of detected and suppressed errors, rerun with: -v
==30909== ERROR SUMMARY: 3 errors from 2 contexts (suppressed: 0 from 0)