Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2001 14:50:01 -0800 (PST)
From:      Mark Peek <mark@whistle.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/32299: nm coredumps on sendmail in -current
Message-ID:  <200111262250.fAQMo1b61658@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/32299; it has been noted by GNATS.

From: Mark Peek <mark@whistle.com>
To: Robert Watson <rwatson@FreeBSD.ORG>,
	FreeBSD-gnats-submit@FreeBSD.ORG
Cc: "David O'Brien" <obrien@FreeBSD.ORG>
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 <deraadt@cvs.openbsd.org>
 ----------------------------
 
 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111262250.fAQMo1b61658>