Assertion failed with simple content element with comments

Bug #857842 reported by Federico Cavalieri
258
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Cezar Andrei

Bug Description

The following query causes an assertion failure at line 3465 in node_items.cpp

import schema namespace s = "http://www.xqdoc.org/1.0";

let $hostInfo :=<xqdoc xmlns="http://www.xqdoc.org/1.0">
    <control>
        <date><?processinginstruction aaa?>TS4J<!-- -->5UJ</date>
        <version>N/A</version>
    </control>
    <module type="library">
        <uri>DGQEb8Q</uri>
    </module>
</xqdoc>

return
  validate { $hostInfo }

If i understand correctly the validator should construct only one text child for <date> with value "TSF4J5UJ"

Related branches

visibility: private → public
Changed in zorba:
importance: Undecided → High
assignee: nobody → Cezar Andrei (cezar-andrei)
Revision history for this message
Federico Cavalieri (fcavalieri) wrote :
Download full text (5.1 KiB)

2005: Test command: /zorba/build/markos/test/rbkt/testdriver "zorba/misc/validate2.xq"
2005: Test timeout computed to be: 1500
2005: test zorba/misc/validate2
2005: === Query: ===
2005:
2005: import schema namespace s = "http://www.xqdoc.org/1.0";
2005:
2005: let $hostInfo :=<xqdoc xmlns="http://www.xqdoc.org/1.0">
2005: <control>
2005: <date><?processinginstruction aaa?>TS4J<!-- -->5UJ</date>
2005: <version>N/A</version>
2005: </control>
2005: <module type="library">
2005: <uri>DGQEb8Q</uri>
2005: </module>
2005: </xqdoc>
2005:
2005: return
2005: validate { $hostInfo }
2005:
2005: === end of Query ===
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(+0xe62a03) [0x141ea03]
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(_ZN5zorba16assertion_failedEPKcS1_i+0x22) [0x141eac6]
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(_ZN5zorba11simplestore8TextNodeC2EPNS0_12InternalNodeERNS_5store10ItemHandleINS4_4ItemEEEb+0x1d6) [0x1b9cf68]
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(_ZN5zorba11simplestore11NodeFactory14createTextNodeEPNS0_12InternalNodeERNS_5store10ItemHandleINS4_4ItemEEEb+0x48) [0x1bb061e]
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(_ZN5zorba11simplestore16BasicItemFactory14createTextNodeERNS_5store10ItemHandleINS2_4ItemEEEPS4_S6_+0x78) [0x1bf0d92]
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(_ZN5zorba9Validator15processChildrenEPKNS_14static_contextEPNS_11TypeManagerERNS_20EventSchemaValidatorEPNS_5store4ItemENS_8rchandleINS8_8IteratorEEERKNS_8QueryLocE+0x37e) [0x1adaa68]
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(_ZN5zorba9Validator14processElementEPKNS_14static_contextEPNS_11TypeManagerERNS_20EventSchemaValidatorEPNS_5store4ItemERKNS8_10ItemHandleIS9_EERKNS_8QueryLocE+0x4a6) [0x1ada018]
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(_ZN5zorba9Validator15processChildrenEPKNS_14static_contextEPNS_11TypeManagerERNS_20EventSchemaValidatorEPNS_5store4ItemENS_8rchandleINS8_8IteratorEEERKNS_8QueryLocE+0xa5) [0x1ada78f]
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(_ZN5zorba9Validator14processElementEPKNS_14static_contextEPNS_11TypeManagerERNS_20EventSchemaValidatorEPNS_5store4ItemERKNS8_10ItemHandleIS9_EERKNS_8QueryLocE+0x4a6) [0x1ada018]
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(_ZN5zorba9Validator15processChildrenEPKNS_14static_contextEPNS_11TypeManagerERNS_20EventSchemaValidatorEPNS_5store4ItemENS_8rchandleINS8_8IteratorEEERKNS_8QueryLocE+0xa5) [0x1ada78f]
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(_ZN5zorba9Validator14processElementEPKNS_14static_contextEPNS_11TypeManagerERNS_20EventSchemaValidatorEPNS_5store4ItemERKNS8_10ItemHandleIS9_EERKNS_8QueryLocE+0x4a6) [0x1ada018]
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(_ZN5zorba9Validator19realValidationValueERNS_5store10ItemHandleINS1_4ItemEEERKS4_S7_PNS_11TypeManagerENS_14ParseConstants17validation_mode_tEPKNS_14static_contextERKNS_8QueryLocE+0x7ea) [0x1ad98fc]
2005: /zorba/build/markos/src/libzorba_simplestore.so.2.0.1(_ZN5zorba9Validator24effectiveValidationValueERNS_...

Read more...

Revision history for this message
Federico Cavalieri (fcavalieri) wrote :

zorba::simplestore::TextNode::TextNode() at node_items.cpp:3,465 0x170ff53
zorba::simplestore::NodeFactory::createTextNode() at node_factory.cpp:140 0x17236c6
zorba::simplestore::BasicItemFactory::createTextNode() at simple_item_factory.cpp:1,626 0x1763e3a
zorba::Validator::processChildren() at validate.cpp:545 0x164da68
zorba::Validator::processElement() at validate.cpp:366 0x164d018
zorba::Validator::processChildren() at validate.cpp:482 0x164d78f
zorba::Validator::processElement() at validate.cpp:366 0x164d018
zorba::Validator::processChildren() at validate.cpp:482 0x164d78f
zorba::Validator::processElement() at validate.cpp:366 0x164d018
zorba::Validator::realValidationValue() at validate.cpp:264 0x164c8fc
zorba::Validator::effectiveValidationValue() at validate.cpp:77 0x164c036
zorba::ValidateIterator::nextImpl() at schema_impl.cpp:63 0x134277d
zorba::Batcher<zorba::ValidateIterator>::produceNext() at plan_iterator.h:531 0xdfce9f
zorba::PlanIterator::consumeNext() at plan_iterator.cpp:124 0x13f4667
zorba::PlanWrapper::next() at plan_wrapper.cpp:149 0x13f404e
zorba::serializer::serialize() at serializer.cpp:2,194 0xc3ce5b
zorba::serializer::serialize() at serializer.cpp:2,154 0xc3cb9c
zorba::XQueryImpl::serialize() at xqueryimpl.cpp:1,176 0xbe22f0
zorba::XQueryImpl::execute() at xqueryimpl.cpp:1,002 0xbe16fb
compileAndExecute() at zorbacmd.cpp:626 0x805a3d2
main() at zorbacmd.cpp:878 0x805b6bc

Changed in zorba:
milestone: none → 2.1
Changed in zorba:
milestone: 2.1 → 2.2
Changed in zorba:
milestone: 2.2 → 2.5
Changed in zorba:
status: New → In Progress
Changed in zorba:
status: In Progress → Fix Committed
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.