Segmentation fault in validated nodes

Bug #854688 reported by Gabriel Petrovay
258
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Unassigned

Bug Description

<d:\mm.xq>:14,3: Zorba error [zerr:ZXQP0002]: "p->numChildren() == 0": assertion failed; raised at zorba\src\store\naive\node_items.cpp:3398

This is in the constructor of a TextNode.

Another way to look on the problem is when a validated element that must be of type string, contains a comment child node. The comment nodes pass the schema validation but there are assumptions in the code that the parent element has only 1 child (i.e. the text node). What happens if comments are interlaced with this text? Or as I've heard, also processing instructions.... Federico?

Revision history for this message
Gabriel Petrovay (gabipetrovay) wrote :
Changed in zorba:
importance: Undecided → High
Revision history for this message
Federico Cavalieri (fcavalieri) wrote :

Yes Gabriel,
processing instruction cause the same/a very similar problem, since the same assumption is not correct:

import schema namespace s = "http://www.xqdoc.org/1.0";
let $hostInfo :=<xqdoc xmlns="http://www.xqdoc.org/1.0">
    <control>
        <date><?processinginstruction aaa?>TS4J5UJ</date>
        <version>N/A</version>
    </control>
    <module type="library">
        <uri>DGQEb8Q</uri>
    </module>
</xqdoc>

return
  validate { $hostInfo }

Moreover the same assumption might be made in typing. If so i will open in some minutes a new bug entry for this.

visibility: private → public
Changed in zorba:
status: New → 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

Bug attachments

Remote bug watches

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