Bugs item #2994521, was opened at 2010-04-30 05:01
Message generated for change (Comment added) made by stmane
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2994521&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core
Group: MonetDB5 CVS Head
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: zeuner (zeuner)
>Assigned to: Stefan Manegold (stmane)
Summary: mat.slice unable to cope with only empty BAT arguments

Initial Comment:
When executing the attached SQL code, the last query gets compiled to a MAL 
sequence containing a line like "_13 := mat.slice(0:wrd,0:wrd,_45,_46);", where 
_45 and _46 are both empty. This causes mat.slice to throw a 
RUNTIME_OBJECT_MISSING exception in line 292 of src/modules/mal/mat.mx, because 
i1 is not initialized to a valid value, and doesn't get set if the argument 
BATs are all empty.

A fix is attached, which will initialize i1 to 3, which leads to correct 
results when the argument BATs are empty, and gets reset if there are non-empty 
BAT arguments.

A more efficient fix would avoid the second loop by initializing i1 to p->argc, 
but this would require to give up the i1 < i2 assertion in line 276, or at 
least replacing it by i1 != i2. The maintainers should probably decide if the 
assertion is still important.

----------------------------------------------------------------------

>Comment By: Stefan Manegold (stmane)
Date: 2010-04-30 11:13

Message:
Thanks for reporting!
I'll take care of it.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2994521&group_id=56967

------------------------------------------------------------------------------
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to