Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9487
Modified Files:
Tag: GDK-2
ll_staircasejoin.mx
Log Message:
Fix a read beyond the end of the heap.
Index: ll_staircasejoin.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/ll_staircasejoin.mx,v
retrieving revision 1.59.2.1
retrieving revision 1.59.2.2
diff -u -d -r1.59.2.1 -r1.59.2.2
--- ll_staircasejoin.mx 14 Aug 2007 14:03:57 -0000 1.59.2.1
+++ ll_staircasejoin.mx 15 Aug 2007 15:53:25 -0000 1.59.2.2
@@ -719,31 +719,6 @@
ctx = *(oid*)BUNtail(ctx_bati,ctx_bun);
iter_idx = *(oid*)BUNtail(iter_bati,iter_bun) - min_iter;
[EMAIL PROTECTED] getnextctx_D
- iter_bun++;
- ctx_bun++;
- ctx = *(oid*)BUNtail(ctx_bati,ctx_bun);
- iter_idx = *(oid*)BUNtail(iter_bati,iter_bun) - min_iter;
-@
[EMAIL PROTECTED] pushctx_D
- if (!onstack_get(iter_idx)) {
- si_D new_stack_item;
- new_stack_item.iter_idx = iter_idx;
- new_stack_item.eocs = ctx + size[ctx];
- stack[stack_top++] = new_stack_item;
- onstack_set(iter_idx);
- if (self) {
- if (pre == cnd && ((kind == NULL) || (kind[pre] == kind_test))) {
- oid iter = min_iter + iter_idx;
- bunfastins(res, &iter, &pre);
- }
- }
- }
-@
[EMAIL PROTECTED] popctx_D
- stack_top--;
- onstack_clr(stack[stack_top].iter_idx);
-@
@= sort_iters_on_stack
for (j = 0 ; j < stack_top ; j++) {
iters_on_stack[j] = stack[j].iter_idx + min_iter;
@@ -798,9 +773,26 @@
to the list of active iters */
pre = ctx;
@:skip_cands_before_pre@
- while (ctx_bun < ctx_last && ctx == cur_ctx) {
- @:pushctx_D@
- @:getnextctx_D@
+ while (ctx_bun < ctx_last) {
+ ctx = *(oid*)BUNtail(ctx_bati,ctx_bun);
+ iter_idx = *(oid*)BUNtail(iter_bati,iter_bun) - min_iter;
+ if (ctx != cur_ctx)
+ break;
+ if (!onstack_get(iter_idx)) {
+ si_D new_stack_item;
+ new_stack_item.iter_idx = iter_idx;
+ new_stack_item.eocs = ctx + size[ctx];
+ stack[stack_top++] = new_stack_item;
+ onstack_set(iter_idx);
+ if (self) {
+ if (pre == cnd && ((kind == NULL) || (kind[pre] ==
kind_test))) {
+ oid iter = min_iter + iter_idx;
+ bunfastins(res, &iter, &pre);
+ }
+ }
+ }
+ iter_bun++;
+ ctx_bun++;
}
@:sort_iters_on_stack@
pre++;
@@ -835,7 +827,8 @@
@:inner_loop_descendant(eocs)@
/* back to enclosing scope: remove all iters that are done */
while (stack_top && stack[stack_top-1].eocs <= eocs) {
- @:popctx_D@
+ stack_top--;
+ onstack_clr(stack[stack_top].iter_idx);
}
@:sort_iters_on_stack@
@
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins