NetBSD-Bugs archive

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

Re: bin/56538: netbsd-3 /bin/ls crashes with current libc



The following reply was made to PR bin/56538; it has been noted by GNATS.

From: Christos Zoulas <christos%zoulas.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost
Subject: Re: bin/56538: netbsd-3 /bin/ls crashes with current libc
Date: Sun, 5 Dec 2021 13:07:34 -0500

 --Apple-Mail=_857A451E-6F85-4ED8-AD84-59AE814F45AA
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=us-ascii
 
 ctime(3) returns NULL and the printtime in the 3.0 print.c does not =
 check for it:
 
 Breakpoint 2, ctime (timep=3D0x7f7fffffe12c)
     at /usr/src/lib/libc/time/localtime.c:1913
 1913    {
 (gdb) print *timep
 $1 =3D 1134943252
 (gdb) fin
 Run till exit from #0  ctime (timep=3D0x7f7fffffe12c)
     at /usr/src/lib/libc/time/localtime.c:1913
 0x000000000040367b in printtime ()
 Value returned is $2 =3D 0x7f7ff7a16e80 "Mon Dec 19 00:00:52 2005\n"
 (gdb) n
 Single stepping until exit from function printtime,
 which has no line number information.
 0x0000000000402b69 in printlong ()
 (gdb) fin
 Run till exit from #0  0x0000000000402b69 in printlong ()
 -rw-rw-r--  1 christos  christos  26087656 Dec 19  2005 base.tgz
 
 Breakpoint 2, ctime (timep=3D0x7f7fffffe12c)
     at /usr/src/lib/libc/time/localtime.c:1913
 1913    {
 (gdb) print *timep
 $3 =3D 1638725229
 (gdb) fin
 Run till exit from #0  ctime (timep=3D0x7f7fffffe12c)
     at /usr/src/lib/libc/time/localtime.c:1913
 0x000000000040367b in printtime ()
 Value returned is $4 =3D 0x0
 (gdb) qq
 Undefined command: "qq".  Try "help".
 (gdb) q
 A debugging session is active.
 
 It turns out the reason this is happening is because we
 are trying to load tzfiles using a 32 bit time_t and we are
 probably reading junk.
 
 christos
 
 
 --Apple-Mail=_857A451E-6F85-4ED8-AD84-59AE814F45AA
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename=signature.asc
 Content-Type: application/pgp-signature;
 	name=signature.asc
 Content-Description: Message signed with OpenPGP
 
 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - http://gpgtools.org
 
 iF0EARECAB0WIQS+BJlbqPkO0MDBdsRxESqxbLM7OgUCYaz/5gAKCRBxESqxbLM7
 OpkDAKCBT+TIIyS8ldwxagpJCHC8RvD/fgCgj5vlv6VrdpWMgo1NCaml5NaxzZA=
 =bEvb
 -----END PGP SIGNATURE-----
 
 --Apple-Mail=_857A451E-6F85-4ED8-AD84-59AE814F45AA--
 


Home | Main Index | Thread Index | Old Index