Changeset: 7d37f6f90a6c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7d37f6f90a6c
Modified Files:
        monetdb5/scheduler/run_octopus.c
Branch: Jan2014
Log Message:

Defensive code for getPC


diffs (30 lines):

diff --git a/monetdb5/scheduler/run_octopus.c b/monetdb5/scheduler/run_octopus.c
--- a/monetdb5/scheduler/run_octopus.c
+++ b/monetdb5/scheduler/run_octopus.c
@@ -408,7 +408,7 @@ OCTOPUSdiscoverRegister(Client cntxt, Ma
 
        start= getPC(mb,pci);
        if( start< 0)
-               throw(MAL,"run.octopus","illegal instruction");
+               throw(MAL,"run.octopus","Illegal instruction");
        for (j = start + 1; j<mb->stop ; j++){
                p= getInstrPtr(mb,j);
                if ( p->barrier == EXITsymbol )
@@ -505,6 +505,8 @@ OCTOPUSbidding(Client cntxt, MalBlkPtr m
     *res = 1;       /* execute the block */
 
     start = getPC(mb,pci);
+       if( start < 0)
+               throw(MAL,"octopus.bidding","Illegal instruction pointer");
     for (j = start + 1; j< mb->stop ; j++){
        p = getInstrPtr(mb,j);
        if ( p->barrier == EXITsymbol )
@@ -673,6 +675,8 @@ OCTOPUSrun(Client cntxt, MalBlkPtr mb, M
 
        *res = 1;       /* execute the block */
        start = getPC(mb,pci);
+       if( start < 0)
+               throw(MAL,"octopus.run","Illegal instruction pointer");
        for (j = start + 1; j< mb->stop ; j++){
                p = getInstrPtr(mb,j);
                if ( p->barrier == EXITsymbol )
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to