size_t idx;
if (data==NULL) {
- fprintf(stderr, "sys_query_module: No memory\n");
+ fprintf(stderr, "out of memory\n");
tprintf(" /* %Zu entries */ ", ret);
} else {
umoven(tcp, tcp->u_arg[2], tcp->u_arg[3], data);
size_t idx;
if (data==NULL) {
- fprintf(stderr, "sys_query_module: No memory\n");
+ fprintf(stderr, "out of memory\n");
tprintf(" /* %Zu entries */ ", ret);
} else {
umoven(tcp, tcp->u_arg[2], tcp->u_arg[3], data);
if (entering(tcp)) {
fds = (fd_set *) malloc(fdsize);
- if (fds == NULL) {
- tprintf("out of memory\n");
- return 0;
- }
+ if (fds == NULL)
+ fprintf(stderr, "out of memory\n");
nfds = args[0];
tprintf("%d", nfds);
for (i = 0; i < 3; i++) {
tprintf(", NULL");
continue;
}
- if (!verbose(tcp)) {
+ if (fds == NULL || !verbose(tcp)) {
tprintf(", %#lx", arg);
continue;
}
}
fds = (fd_set *) malloc(fdsize);
- if (fds == NULL) {
- tprintf("out of memory\n");
- return 0;
- }
+ if (fds == NULL)
+ fprintf(stderr, "out of memory\n");
outstr[0] = '\0';
for (i = 0; i < 3; i++) {
tcp->auxstr = outstr;
arg = args[i+1];
- if (!arg || umoven(tcp, arg, fdsize, (char *) fds) < 0)
+ if (fds == NULL || !arg ||
+ umoven(tcp, arg, fdsize, (char *) fds) < 0)
continue;
for (j = 0; j < args[0]; j++) {
if (FD_ISSET(j, fds)) {
}
len = tcp->u_rval;
if ((buf = malloc(len)) == NULL) {
- tprintf("out of memory\n");
+ tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
+ fprintf(stderr, "out of memory\n");
return 0;
}
if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) {
- tprintf("{...}, %lu", tcp->u_arg[2]);
+ tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
free(buf);
return 0;
}
}
len = tcp->u_rval;
if ((buf = malloc(len)) == NULL) {
- tprintf("out of memory\n");
+ tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
+ fprintf(stderr, "out of memory\n");
return 0;
}
if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) {
- tprintf("{...}, %lu", tcp->u_arg[2]);
+ tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
free(buf);
return 0;
}
}
len = tcp->u_rval;
if ((buf = malloc(len)) == NULL) {
- tprintf("out of memory\n");
+ tprintf("%#lx, %lu, %#lx", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
+ fprintf(stderr, "out of memory\n");
return 0;
}
if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) {
- tprintf("{...}, %lu, %#lx", tcp->u_arg[2], tcp->u_arg[3]);
+ tprintf("%#lx, %lu, %#lx", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
free(buf);
return 0;
}
sys_mincore(tcp)
struct tcb *tcp;
{
- int i, len;
+ unsigned long i, len;
char *vec = NULL;
if (entering(tcp)) {
} else {
len = tcp->u_arg[1];
if (syserror(tcp) || tcp->u_arg[2] == 0 ||
- (vec = malloc((u_int)len)) == NULL ||
+ (vec = malloc(len)) == NULL ||
umoven(tcp, tcp->u_arg[2], len, vec) < 0)
tprintf("%#lx", tcp->u_arg[2]);
else {
free (pollv);
pollv = (struct pollfd *) malloc(nprocs * sizeof pollv[0]);
if (pollv == NULL) {
- fprintf(stderr, "strace: out of memory for poll vector\n");
+ fprintf(stderr, "%s: out of memory\n", progname);
exit(1);
}
if(!entering(tcp)) {
if (!arg0) {
if ((arg0 = malloc(sizeof(*arg0))) == NULL) {
- fprintf(stderr, "sys_capget: no memory\n");
+ fprintf(stderr, "out of memory\n");
tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
return -1;
}
}
if (!arg1) {
if ((arg1 = malloc(sizeof(*arg1))) == NULL) {
- fprintf(stderr, "sys_capget: no memory\n");
+ fprintf(stderr, "out of memory\n");
tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
return -1;
}
if(entering(tcp)) {
if (!arg0) {
if ((arg0 = malloc(sizeof(*arg0))) == NULL) {
- fprintf(stderr, "sys_capset: no memory\n");
+ fprintf(stderr, "out of memory\n");
tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
return -1;
}
}
if (!arg1) {
if ((arg1 = malloc(sizeof(*arg1))) == NULL) {
- fprintf(stderr, "sys_capset: no memory\n");
+ fprintf(stderr, "out of memory\n");
tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
return -1;
}
if (!str) {
if ((str = malloc(max_strlen)) == NULL
|| (outstr = malloc(2*max_strlen)) == NULL) {
- fprintf(stderr, "printstr: no memory\n");
+ fprintf(stderr, "out of memory\n");
tprintf("%#lx", addr);
return;
}
if (str)
free(str);
if ((str = malloc(len)) == NULL) {
- fprintf(stderr, "dump: no memory\n");
+ fprintf(stderr, "out of memory\n");
return;
}
strsize = len;
return -1;
}
if ((strtab = malloc((unsigned)ld.ld_symb_size)) == NULL) {
- fprintf(stderr, "fixvfork: out of memory\n");
+ fprintf(stderr, "out of memory\n");
return -1;
}
if (umoven(tcp, (int)ld.ld_symbols+(int)N_TXTADDR(hdr),