Date: Sun, 27 Oct 1996 22:11:04 -0500 (EST) From: dmaddox@scsn.net To: FreeBSD-gnats-submit@freebsd.org Subject: bin/1909: 'last' coredumps if MALLOC_OPTIONS include 'J' Message-ID: <199610280311.WAA16917@rhiannon.scsn.net> Resent-Message-ID: <199610280600.WAA02007@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 1909 >Category: bin >Synopsis: 'last' coredumps if MALLOC_OPTIONS include 'J' >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 27 22:00:02 PST 1996 >Last-Modified: >Originator: Donald J. Maddox >Organization: None >Release: FreeBSD 2.2-CURRENT i386 >Environment: FreeBSD rhiannon.scsn.net 2.2-CURRENT FreeBSD 2.2-CURRENT #0: Fri Oct 25 23:10:41 EDT 1996 root@rhiannon.scsn.net:/usr/src/sys/compile/RHIANNON i386 >Description: 'last' coredumps when MALLOC_OPTIONS include 'J'. The problem seems to be here in /usr/src/usr.bin/last/last.c, lines 192-197: if (bp->ut_line[0] == '~' && !bp->ut_line[1]) { /* everybody just logged out */ for (tt = ttylist.lh_first; tt; tt = tt->list.le_next) { LIST_REMOVE(tt, list); free(tt); } The first time this loop iterates, tt is freed; however, when MALLOC_OPTIONS includes 'J', this causes the pointer to be overwritten with junk, so the second iteration fails. >How-To-Repeat: #ln -sf AJ /etc/malloc.conf #last >Fix: I'm not certain what the best fix is, so I'll leave it to the experts... :-) >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610280311.WAA16917>