[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] mini-os: C programming

2 questions on the code of mini-os (the one in XEN 3.0.3):

1. In xen-3.0.3/extras/mini-os/mm.c:52 is a declaration of stack

extern char *stack;

but in file xen-3.0.3/extras/mini-os/arch/x86/setup.c:48, there is also a decl of stack:

char stack[8192];

If one dereferences the variable stack, which is apparently not the case yet, it gives surely a segfault!

2. In file xen-3.0.3/extras/mini-os/gnttab.c:140: the const variable gnttabop_error_msgs
is declared as

static const char *gnttabop_error_msgs[] = GNTTABOP_error_msgs;

shouldn't that instead be declared:

static const char * const gnttabop_error_msgs[] = GNTTABOP_error_msgs;
(BTW, even the first const is useless as there are consts in GNTTABOP_error_msgs)

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.