Serialization of Tumbling Window For fails

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

Bug Description

Hello

The serialization of a tumbling window for is broken. The assertion at src/zorbaserialization/class_serializer.h:399 doesn't pass. The problem can be reproduced by extending the plan_serialization unit test with the following diff:

=== modified file 'test/unit/guestbook.xq'
--- test/unit/guestbook.xq 2011-08-12 16:07:57 +0000
+++ test/unit/guestbook.xq 2011-10-12 13:06:44 +0000
@@ -37,6 +37,14 @@
       return 1
 };

+declare function guestbook:window() {
+ let $x := 1 to 1000
+ for tumbling window $w in $x
+ start at $s when fn:true()
+ end at $e when $e - $s eq 51
+ return <window>{ $w }</window>
+};
+
 declare %ann:sequential function guestbook:init() {
   ddl:create($guestbook:entries);
 };

=== modified file 'test/unit/guestbook_main.xq'
--- test/unit/guestbook_main.xq 2011-08-05 02:21:55 +0000
+++ test/unit/guestbook_main.xq 2011-10-12 12:58:13 +0000
@@ -18,4 +18,4 @@

 import module namespace refl = "http://www.zorba-xquery.com/modules/reflection";

-guestbook:init(), refl:eval("guestbook:list()")
+guestbook:init(), refl:eval("guestbook:list()"), refl:eval("guestbook:window()")

the test result is:

ctest -R plan_seri -V
UpdateCTestConfiguration from :/home/dagraf/zorba/build/DartConfiguration.tcl
Parse Config file:/home/dagraf/zorba/build/DartConfiguration.tcl
 Add coverage exclude regular expressions.
 Add coverage exclude: mapm.*
UpdateCTestConfiguration from :/home/dagraf/zorba/build/DartConfiguration.tcl
Parse Config file:/home/dagraf/zorba/build/DartConfiguration.tcl
Test project /home/dagraf/zorba/build
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
test 2041
    Start 2041: test/unit/plan_serializer

2041: Test command: /home/dagraf/zorba/build/test/unit/UnitTests plan_serializer
2041: Test timeout computed to be: 1500
2041: <//home/dagraf/zorba/build/test/unit/guestbook.xq>:27,25: Zorba static warning [zwarn:ZWST0003]: "guestbook:list": function declared sequential, but has non-sequential body; raised at /home/dagraf/zorba/sandbox/src/compiler/translator/translator.cpp:3399
2041: UnitTests: /home/dagraf/zorba/sandbox/src/zorbatypes/rchandle.h:111: virtual void zorba::SimpleRCObject::serialize_internal(zorba::serialization::Archiver&): Assertion `strstr(typeid(*this).name(), "SimpleRCObject")' failed.
1/1 Test #2041: test/unit/plan_serializer ........***Exception: SegFault 0.08 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 0.17 sec

The following tests FAILED:
 2041 - test/unit/plan_serializer (SEGFAULT)
Errors while running CTest

David Graf (davidagraf)
Changed in zorba:
assignee: nobody → Daniel Turcanu (danielturcanu)
Changed in zorba:
importance: Undecided → High
assignee: Daniel Turcanu (danielturcanu) → Markos Zaharioudakis (markos-za)
Changed in zorba:
milestone: none → 2.7
Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

I looks like this bug has been fixed already. Not sure in what release.

Changed in zorba:
status: New → Fix Committed
Changed in zorba:
milestone: 2.7 → 2.6
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.