Changeset: cd9827839fee for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cd9827839fee
Modified Files:
        MonetDB5/src/optimizer/opt_mapreduce.mx
Branch: default
Log Message:

Use NOOP instructions to avoid crashing due to previous NULL pointers


diffs (36 lines):

diff -r 7a81d73056df -r cd9827839fee MonetDB5/src/optimizer/opt_mapreduce.mx
--- a/MonetDB5/src/optimizer/opt_mapreduce.mx   Thu May 20 20:33:17 2010 +0200
+++ b/MonetDB5/src/optimizer/opt_mapreduce.mx   Thu May 20 20:39:00 2010 +0200
@@ -566,8 +566,7 @@
                        case SINGLE:
                                copy = LEAVE;
                                pushInstruction(mc, p);
-                               freeInstruction(orig[i]);
-                               orig[i] = NULL;
+                               orig[i]->token = NOOPsymbol;
                        break;
                        case STICK:
                        case DUP:
@@ -590,8 +589,6 @@
        copy = STICK;
        for (i = 0; i < limit; i++) { /* phase 2 */
                p = orig[i];
-               if (p == NULL)
-                       continue;
 
                if (p == (InstrPtr)1) {
                        newComment(mb, "{ map");
@@ -602,6 +599,13 @@
                                sig = pushReturn(mc, sig, lastcol->val1);
                        MRdistributework(cntxt, mb, col, sig, mrcluster);
                        newComment(mb, "} map");
+                       /* bogus instruction to be able to set to NOOP */
+                       orig[i] = newInstruction(mb, ASSIGNsymbol);
+                       setModuleId(orig[i], ioRef);
+                       setFunctionId(orig[i], printRef);
+                       orig[i] = pushReturn(mb, orig[i], 0);
+                       orig[i] = pushArgument(mb, orig[i], 0);
+                       orig[i]->token = NOOPsymbol;
                        continue;
                }
 
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to