From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 28044 invoked from network); 23 Sep 1998 23:45:09 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 23 Sep 1998 23:45:09 -0000 Received: from vanuata (vanuata.dcs.gla.ac.uk [130.209.240.50]) by mail.redhat.com (8.8.7/8.8.7) with SMTP id TAA04504; Wed, 23 Sep 1998 19:45:40 -0400 Received: from bathurst by vanuata with SMTP DCS (MMTA); Wed, 23 Sep 1998 18:50:06 +0100 Received: from localhost by bathurst; (5.65v3.2/1.1.8.2/19Apr96-0202PM) id AA00702; Wed, 23 Sep 1998 18:48:19 +0100 Message-Id: <9809231748.AA00702@bathurst> X-Mailer: exmh version 2.0.2 2/24/98 To: axp-list@redhat.com, Thomas Bogendoerfer , bugs@redhat.com Cc: rjb@dcs.gla.ac.uk Subject: Another bug in strace-3.1 In-Reply-To: Your message of "Tue, 22 Sep 98 01:35:31 +0200." <19980922013531.28943@alpha.franken.de> Date: Wed, 23 Sep 98 18:48:19 +0100 From: Richard Black X-Mts: smtp MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" > On Mon, Sep 21, 1998 at 03:41:07PM +0100, Richard Black wrote: > > The following program, when run under strace on alpha linux shows that > > strace on alpha linux does not record the mmap call correctly. It is > > recorded correctly on intel linux. > > below is my current patchset for strace. It fixes the mmap bug and > some other oddities. > > - Also the strace source rpm (even with the supplied patches) does not > > compile > strace-3.1-7 (RedHat 5.1) compiled at least on my Alpha. The patch is > on top of it. Many thanks to Thomas for his patches, though I have looked on ftp.redhat.com and can only find strace-3.1-5. Here is another problem -- the fstat (and related) calls appear to report something wrong i.e. neither the contents of the stat buffer before the call, nor the contents after the call. This happens on *both* intel and alpha. Here is the program: #include #include #include #include #include #include #include int main(int argc, char **argv) { int fd = open("/etc/passwd", O_RDONLY); struct stat s; char buf[1024]; /* just to de-cloud strace log */ s.st_mode = 42; s.st_size = 12345678; if (fstat(fd, &s) < 0) perror("stat:"); sprintf(buf, "st_mode=%d, st_size=%ld\n", s.st_mode, s.st_size); write(1, buf, strlen(buf)); return 0; } and here is the output on intel: open("/etc/passwd", O_RDONLY) = 5 fstat(5, {st_mode=0, st_size=0, ...}) = 0 write(1, "st_mode=33188, st_size=585\n", 27st_mode=33188, st_size=585 ) = 27 _exit(0) = ? and here is the output on alpha: open("/etc/passwd", O_RDONLY) = 3 fstat(3, {st_mode=01, st_size=906571131, ...}) = 0 write(1, "st_mode=33188, st_size=585\n", 27st_mode=33188, st_size=585 ) = 27 exit(0) = ? You can see that the information reported in the braces is completely wrong. Richard. PS: Curiosity -- why do the alpha systems start at fd 5 and the intel ones at fd 3?