[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix order-of-evaluation issue in xc_domain_dumpcore. The intent is
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 17e26f60e9013db4655167945f001436f2b8237e # Parent a4dc14edd56b2b59fa3f7797b048ce6ee8efc9e9 Fix order-of-evaluation issue in xc_domain_dumpcore. The intent is to move blocks of memory 4096 pages at a time, and a buffer is allocated for this. Unfortunately, the #define is without parentheses and %/* are the same order and evaluated left to right. Result: very big buffer being used 4 pages at a time. Signed-off-by: Ben Thomas (bthomas@xxxxxxxxxxxxxxx) diff -r a4dc14edd56b -r 17e26f60e901 tools/libxc/xc_core.c --- a/tools/libxc/xc_core.c Wed Mar 8 23:45:40 2006 +++ b/tools/libxc/xc_core.c Thu Mar 9 10:16:46 2006 @@ -6,7 +6,7 @@ #include <zlib.h> /* number of pages to write at a time */ -#define DUMP_INCREMENT 4 * 1024 +#define DUMP_INCREMENT (4 * 1024) #define round_pgup(_p) (((_p)+(PAGE_SIZE-1))&PAGE_MASK) static int _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |