Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sc8-pr-cvs16:/tmp/cvs-serv28290/compiler/mil
Modified Files:
Tag: XQuery_0-16
milprint_summer.c
Log Message:
new day new lesson:
When replacing alloca in a loop be malloc/realloc,
make sure that you do not forget/overwrite
the origin of the (m|re)alloc'ed buf-fer;
this should keep MonetDB?XQuery from segfaulting
(e.g.) when loading an XQuery module
(
new day, still the old lesson:
testing (would have) found this problem
)
Index: milprint_summer.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milprint_summer.c,v
retrieving revision 1.318.2.35
retrieving revision 1.318.2.36
diff -u -d -r1.318.2.35 -r1.318.2.36
--- milprint_summer.c 2 May 2007 08:36:10 -0000 1.318.2.35
+++ milprint_summer.c 2 May 2007 22:01:26 -0000 1.318.2.36
@@ -10877,13 +10877,13 @@
}
nme = buf;
if (strchr(tpe, ':') == NULL) {
- *buf++ = 'x';
- *buf++ = 's';
- *buf++ = ':';
+ *nme++ = 'x';
+ *nme++ = 's';
+ *nme++ = ':';
}
- strcpy(buf, tpe);
- buf = strchr(nme, ' ');
- if (buf) *buf = 0;
+ strcpy(nme, tpe);
+ nme = strchr(buf, ' ');
+ if (nme) *nme = 0;
assert (L(args) && L(args)->kind == c_param);
assert (LR(args) && LR(args)->kind == c_var);
@@ -10897,7 +10897,7 @@
if (first == 0) first = vid;
strncat(sig, ",", 1024);
- strncat(sig, nme, 1024);
+ strncat(sig, buf, 1024);
args = R(args);
}
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins