Brad Lassey - bug 463561 - mkdepend crashes while compiling freetype, follow up push to js/src r=bsmedberg a191=beltzner
authorBrad Lassey <blassey@mozilla.com>
Fri, 23 Jan 2009 16:06:15 -0500
changeset 24142 561fa10a7d71d66cdb1322babfc8fe9e86283476
parent 24141 5d1b3f37a76b7cea4bd55f5e3277afc262789b3f
child 24143 41045faa0ef67ac4f38b1c3c96b06e51710426f1
push id4932
push userblassey@mozilla.com
push dateFri, 23 Jan 2009 21:06:52 +0000
treeherdermozilla-central@561fa10a7d71 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs463561
milestone1.9.2a1pre
Brad Lassey - bug 463561 - mkdepend crashes while compiling freetype, follow up push to js/src r=bsmedberg a191=beltzner
js/src/config/mkdepend/ifparser.c
--- a/js/src/config/mkdepend/ifparser.c
+++ b/js/src/config/mkdepend/ifparser.c
@@ -291,16 +291,18 @@ parse_product (IfParser *g, const char *
     switch (*cp) {
       case '*':
 	DO (cp = parse_product (g, cp + 1, &rightval));
 	*valp = (*valp * rightval);
 	break;
 
       case '/':
 	DO (cp = parse_product (g, cp + 1, &rightval));
+	if (rightval == 0)
+	  return CALLFUNC(g, handle_error) (g, cp, "0");
 	*valp = (*valp / rightval);
 	break;
 
       case '%':
 	DO (cp = parse_product (g, cp + 1, &rightval));
 	*valp = (*valp % rightval);
 	break;
     }