Date: Sat, 25 Mar 2006 01:14:20 +0000 (UTC) From: Peter Wemm <peter@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/gcore elfcore.c Message-ID: <200603250114.k2P1EKCF039759@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
peter 2006-03-25 01:14:20 UTC FreeBSD src repository Modified files: usr.bin/gcore elfcore.c Log: Make gcore(1) 64 bit safe. It was trying to parse the /proc/*/map file using sscanf and truncating the start/end entries by writing them with a 32 bit int descriptor (%x). The upper bytes of the 64 bit vm_offset_t variables (for little endian machines) were uninitialized. For big endian machines, things would have been worse because it was storing the 32 bit value in the upper half of the 64 bit variable. I've changed it to use %lx and long types. That should work on all our platforms. Revision Changes Path 1.18 +3 -3 src/usr.bin/gcore/elfcore.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603250114.k2P1EKCF039759>