From owner-freebsd-bugs Mon Nov 26 14:50: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5BD6737B419 for ; Mon, 26 Nov 2001 14:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fAQMo1b61658; Mon, 26 Nov 2001 14:50:01 -0800 (PST) (envelope-from gnats) Date: Mon, 26 Nov 2001 14:50:01 -0800 (PST) Message-Id: <200111262250.fAQMo1b61658@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Mark Peek Subject: Re: bin/32299: nm coredumps on sendmail in -current Reply-To: Mark Peek Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/32299; it has been noted by GNATS. From: Mark Peek To: Robert Watson , FreeBSD-gnats-submit@FreeBSD.ORG Cc: "David O'Brien" Subject: Re: bin/32299: nm coredumps on sendmail in -current Date: Mon, 26 Nov 2001 14:39:57 -0800 This probably started occurring around the time of this commit to lib/libc/stdlib/malloc.c: ---------------------------- revision 1.60 date: 2001/11/02 11:32:28; author: phk; state: Exp; lines: +14 -4 phkmalloc->evilchecks++; If zero bytes are allocated, return pointer to the middle of page-zero (which is protected) so that the program will crash if it dereferences this illgotten pointer. Inspired & Urged by: Theo de Raadt ---------------------------- Try this patch to fix nm: Index: contrib/binutils/bfd/syms.c =================================================================== RCS file: /cvs/freebsd/src/contrib/binutils/bfd/syms.c,v retrieving revision 1.1.1.5 diff -u -u -r1.1.1.5 syms.c --- contrib/binutils/bfd/syms.c 2001/06/26 16:56:40 1.1.1.5 +++ contrib/binutils/bfd/syms.c 2001/11/26 22:34:50 @@ -715,6 +715,8 @@ storage = bfd_get_symtab_upper_bound (abfd); if (storage < 0) goto error_return; + if (storage == 0) + return 0; syms = (asymbol **) bfd_malloc ((size_t) storage); if (syms == NULL) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message