segmentation fault when using fetch and parse in one flwor

Bug #1015560 reported by David Graf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Markos Zaharioudakis

Bug Description

Zorba destroys input stream produced by fetch:content too early if optimization is on.

example query:

import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch";
import module namespace parse-xml = "http://www.zorba-xquery.com/modules/xml";
import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";

  let $xmlcontent := fetch:content("file.xml")
  let $contents := parse-xml:parse(
        $xmlcontent,
        <opt:options>
          <opt:parse-external-parsed-entity />
        </opt:options>)
  return $contents

file:xml:
any random xml file

executions:
$ ~/zorba/build/bin/zorba -q test.xq -f --optimization-level O0
<?xml version="1.0" encoding="UTF-8"?>
<a/>
$ ~/zorba/build/bin/zorba -q test.xq -f --optimization-level O1
<?xml version="1.0" encoding="UTF-8"?>
Segmentation fault (core dumped)

Changed in zorba:
importance: Undecided → High
assignee: Matthias Brantner (matthias-brantner) → Markos Zaharioudakis (markos-za)
Changed in zorba:
milestone: none → 2.9
tags: added: string-streaming
Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

It works fine for me. Given that the bug was opened a year ago, it has probably been fixed already.

Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

Valgrind does not report any errors either.

Changed in zorba:
status: New → Fix Committed
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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