| Summary: | nm coredumps on sendmail in -current | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Robert Watson <rwatson> |
| Component: | bin | Assignee: | Peter Wemm <peter> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 5.0-CURRENT | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Robert Watson
2001-11-26 19:10:01 UTC
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) Responsible Changed From-To: freebsd-bugs->peter So Peter knows "of the origins of this patch". State Changed From-To: open->closed Fixed in rev. 1.1.1.6 and rev. 1.1.1.2.6.3 src/contrib/binutils/bfd/syms.c in -CURRENT and -STABLE. |