Changeset: 8fa1212bfe7c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8fa1212bfe7c
Modified Files:
        monetdb5/mal/mal_parser.mx
Branch: Mar2011
Log Message:

parseCommandPattern: return an error when an address wasn't found

On Darwin some more modules than on Linux are missing, which is probably
the cause why this went unnoticed.  If no address was found, fcn will be
NULL, which in turn will lead to a dereference in malAtomPropery.  So
return an error instead.


diffs (12 lines):

diff --git a/monetdb5/mal/mal_parser.mx b/monetdb5/mal/mal_parser.mx
--- a/monetdb5/mal/mal_parser.mx
+++ b/monetdb5/mal/mal_parser.mx
@@ -1330,6 +1330,8 @@
                setModuleScope(curInstr, 
                        findModule(cntxt->nspace, 
putName(modnme,strlen(modnme))) );
                curInstr->fcn = getAddress(cntxt->srcFile, modnme, nme,TRUE);
+               if (curInstr->fcn == NULL)
+                       return (MalBlkPtr) parseError(cntxt, "<address> not 
found\n");
                curBlk->binding = nme;
                if( cntxt->nspace->isAtomModule) 
                        malAtomProperty(curBlk, curInstr);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to