Subject: hanging lint
To: None <current-users@netbsd.org>
From: Sean Doran <smd@ebone.net>
List: current-users
Date: 11/17/1998 17:09:16
I now see a hang in /usr/src/lib/libc/quad/fixunsdfdi.c linting also.

/usr/libexec/lint1 -c -h -a -p -b -z /tmp/TMPFILE fixunsdfdi.ln
(where the TMPFILE is a copy of what was handed to lint1 by the hanged
/usr/bin/lint invocation) hangs.

Highlights of a kdump -R up to the point where I send SIGINT (after
many minutes of hanging after the mmap) follows.  Note the hanged mmap
comes right after a 0-length read.

This will be *fun* to debug.

	Sean.

  8052 lint1    0.000785 CALL  open(0xefbfcc81,0,0x1b6)
  8052 lint1    0.000075 NAMI  "/tmp/L"
  8052 lint1    0.000105 RET   open 3
  8052 lint1    0.000112 CALL  open(0xefbfcc88,0x601,0x1b6)
  8052 lint1    0.000060 NAMI  "fixunsdfdi.ln"
  8052 lint1    0.000173 RET   open 4
  8052 lint1    0.000178 CALL  __sysctl(0xefbfca54,0x2,0x400a4f04,0xefbfca50,0,0
)
  8052 lint1    0.000095 RET   __sysctl 0
  8052 lint1    0.000068 CALL  break(0x21870)
  8052 lint1    0.000040 RET   break 0
  8052 lint1    0.000034 CALL  break(0x21ffc)
  8052 lint1    0.000122 RET   break 0
  8052 lint1    0.000039 CALL  break(0x22ffc)
  8052 lint1    0.000062 RET   break 0
  8052 lint1    0.000100 CALL  break(0x23ffc)
  8052 lint1    0.000062 RET   break 0
  8052 lint1    0.000223 CALL  break(0x24ffc)
  8052 lint1    0.000070 RET   break 0
  8052 lint1    0.000148 CALL  break(0x25ffc)
  8052 lint1    0.000068 RET   break 0
  8052 lint1    0.000142 CALL  break(0x26ffc)
  8052 lint1    0.000067 RET   break 0
  8052 lint1    0.000176 CALL  mmap(0,0x4000,0x3,0x1002,0xffffffff,0,0,0)
  8052 lint1    0.000064 RET   mmap 1074417664/0x400a5000
  8052 lint1    0.000770 CALL  break(0x27ffc)
  8052 lint1    0.000084 RET   break 0
  8052 lint1    0.000135 CALL  break(0x28ffc)
  8052 lint1    0.000069 RET   break 0
  8052 lint1    0.000128 CALL  break(0x2dffc)
  8052 lint1    0.000066 RET   break 0
  8052 lint1    0.000184 CALL  ioctl(0x3,TIOCGETA,0xefbfca04)
  8052 lint1    0.000056 RET   ioctl -1 errno 25 Inappropriate ioctl for device
  8052 lint1    0.000250 CALL  __fstat13(0x3,0xefbfc97c)
  8052 lint1    0.000064 RET   __fstat13 0
  8052 lint1    0.000040 CALL  break(0x30ffc)
  8052 lint1    0.000066 RET   break 0
  8052 lint1    0.000158 CALL  read(0x3,0x2e000,0x2000)
  8052 lint1    0.000437 GIO   fd 3 read 8192 bytes
       "# 1 "/usr/src/lib/libc/quad/fixunsdfdi.c"
        /*      $NetBSD: fixunsdfdi.c,v 1.4 1997/07/13 20:01:45 christos Exp $\
                */
...
        /*
         * Quad arithmetic.
         *
         * This library makes"
  8052 lint1    0.000784 RET   read 8192/0x2000
  8052 lint1    0.000760 CALL  __fstat13(0x4,0xefbfc920)
  8052 lint1    0.000069 RET   __fstat13 0
  8052 lint1    0.000039 CALL  break(0x35ffc)
  8052 lint1    0.000070 RET   break 0
  8052 lint1    0.003071 CALL  read(0x3,0x2e000,0x2000)
  8052 lint1    0.000303 GIO   fd 3 read 8192 bytes
       " the following assumptions:
...
         * chosen over a long is that the i"
  8052 lint1    0.000872 RET   read 8192/0x2000
  8052 lint1    0.004195 CALL  read(0x3,0x2e000,0x2000)
  8052 lint1    0.000386 GIO   fd 3 read 8192 bytes
       "s*() and to*() routines take ints (says
  8052 lint1    0.000729 RET   read 8192/0x2000
  8052 lint1    0.005361 CALL  break(0x36ffc)
  8052 lint1    0.000093 RET   break 0
  8052 lint1    0.003806 CALL  mmap(0,0x4000,0x3,0x1002,0xffffffff,0,0,0)
  8052 lint1    0.000094 RET   mmap 1074434048/0x400a9000
  8052 lint1    0.001681 CALL  read(0x3,0x2e000,0x2000)
  8052 lint1    0.000284 GIO   fd 3 read 8192 bytes
       "the above copyright
...
  8052 lint1    0.000753 RET   read 8192/0x2000
  8052 lint1    0.003735 CALL  mmap(0,0x4000,0x3,0x1002,0xffffffff,0,0,0)
  8052 lint1    0.000095 RET   mmap 1074450432/0x400ad000
  8052 lint1    0.000859 CALL  read(0x3,0x2e000,0x2000)
  8052 lint1    0.000147 GIO   fd 3 read 2812 bytes
       "_bits_in_long/2)).  (`x' must actually be u_long.)
...
  8052 lint1    0.000299 RET   read 2812/0xafc
  8052 lint1    0.000138 CALL  read(0x3,0x2e000,0x2000)
  8052 lint1    0.000049 GIO   fd 3 read 0 bytes
       ""
  8052 lint1    0.000035 RET   read 0
  8052 lint1    0.007770 CALL  mmap(0,0x4000,0x3,0x1002,0xffffffff,0,0,0)
  8052 lint1    0.000094 RET   mmap 1074466816/0x400b1000
  8052 lint1    82.490336 PSIG  SIGINT SIG_DFL