memory corruption in Item::swap() method.
Bug #1102997 reported by
Markos Zaharioudakis
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Fix Committed
|
High
|
Ghislain Fourny |
Bug Description
In Item::swap() method, the following lines are *very* wrong:
*theUnion.
*theUnion.
*anotherIte
*anotherIte
This and/or potentially other bugs with the swap() method cause the test collections/
Related branches
lp:~zorba-coders/zorba/bug-1111487
- Markos Zaharioudakis: Approve
- Dennis Knochenwefel: Approve
- Till Westmann: Approve
-
Diff: 105 lines (+46/-18)3 files modifiedChangeLog (+2/-0)
src/store/naive/node_items.cpp (+27/-18)
test/rbkt/Queries/zorba/collections/edit/edit_collection_005.xq (+17/-0)
tags: | added: memory-problems |
Changed in zorba: | |
assignee: | Ghislain Fourny (gislenius) → Markos Zaharioudakis (markos-za) |
To post a comment you must log in.
I am going to removed the failing test because it prevents me from committing to the trunk. I copy the query text here:
import module namespace ddl = "http:// www.zorba- xquery. com/modules/ store/static/ collections/ ddl"; www.zorba- xquery. com/modules/ store/static/ collections/ dml"; www.zorba- xquery. com/modules/ node-reference";
import module namespace dml = "http://
import module namespace ref = "http://
import module namespace ns = "http:// www.example. com/example" at "../collection_ 001.xqdata" ;
ddl:create( xs:QName( "ns:collection" ));
dml:insert( xs:QName( "ns:collection" ), (<a/>, <b/>, <c/>));
variable $old := ref:node- reference( dml:collection( xs:QName( "ns:collection" ))[2]);
dml:edit( dml:collection( xs:QName( "ns:collection" ))[2], <d/>);
variable $new := ref:node- reference( dml:collection( xs:QName( "ns:collection" ))[2]);
$old eq $new