aboutsummaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-02-08 15:34:46 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-02-08 15:34:46 +0100
commit751acb3d70ebefcde1b71fb2ab61a3cffd2e7c4b (patch)
treea4f4cbf245c26ba140bdfe3867b56a088762cfaa /file.c
parent86d94843cf4e7831dd118175d3814be037eb9056 (diff)
downloadstrace-751acb3d70ebefcde1b71fb2ab61a3cffd2e7c4b.tar.gz
Dying suddenly with abort() is rude, avoid if possible
* file.c (sys_utime): Don't call abort() if wordsize is strange. Instead, warn user about it. * desc.c (printflock): Use the same message string as in sys_utime. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'file.c')
-rw-r--r--file.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/file.c b/file.c
index 1cd8d3c0b..151fc31cd 100644
--- a/file.c
+++ b/file.c
@@ -2121,12 +2121,15 @@ sys_utime(struct tcb *tcp)
union {
long utl[2];
int uti[2];
+ long paranoia_for_huge_wordsize[4];
} u;
- unsigned wordsize = current_wordsize;
+ unsigned wordsize;
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
tprints(", ");
+
+ wordsize = current_wordsize;
if (!tcp->u_arg[1])
tprints("NULL");
else if (!verbose(tcp))
@@ -2142,7 +2145,8 @@ sys_utime(struct tcb *tcp)
tprintf(" %s]", sprinttime(u.uti[1]));
}
else
- abort();
+ tprintf("<decode error: unsupported wordsize %d>",
+ wordsize);
}
return 0;
}