From 9fab5fb01ddbd59e5aa97edb223fd1e132231682 Mon Sep 17 00:00:00 2001 From: tedu <> Date: Wed, 6 Jan 2016 17:57:22 +0000 Subject: Long ago, malloc internally had two kinds of failures, warnings and errors. The 'A' option elevated warnings to errors, and has been the default for some time. Then warnings were effectively eliminated in favor of everything being an error, but then the 'a' flag turned real errors into warnings! Remove the 'a' option entirely. You shouldn't have used it anyway. ok tb tdeval --- src/lib/libc/stdlib/malloc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/lib/libc/stdlib/malloc.c') diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 7d64be89a9..23e076bdaf 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.179 2015/12/30 06:04:39 tedu Exp $ */ +/* $OpenBSD: malloc.c,v 1.180 2016/01/06 17:57:22 tedu Exp $ */ /* * Copyright (c) 2008, 2010, 2011 Otto Moerbeek * Copyright (c) 2012 Matthew Dempsky @@ -177,7 +177,6 @@ struct chunk_info { struct malloc_readonly { struct dir_info *malloc_pool; /* Main bookkeeping information */ - int malloc_abort; /* abort() on error */ int malloc_freenow; /* Free quickly - disable chunk rnd */ int malloc_freeunmap; /* mprotect free pages PROT_NONE? */ int malloc_hint; /* call madvice on free pages? */ @@ -280,8 +279,8 @@ wrterror(char *msg, void *p) #endif /* MALLOC_STATS */ errno = saved_errno; - if (mopts.malloc_abort) - abort(); + + abort(); } static void @@ -485,7 +484,6 @@ omalloc_init(struct dir_info **dp) /* * Default options */ - mopts.malloc_abort = 1; mopts.malloc_junk = 1; mopts.malloc_move = 1; mopts.malloc_cache = MALLOC_DEFAULT_CACHE; @@ -523,10 +521,8 @@ omalloc_init(struct dir_info **dp) mopts.malloc_cache >>= 1; break; case 'a': - mopts.malloc_abort = 0; - break; case 'A': - mopts.malloc_abort = 1; + /* ignored */ break; case 'c': mopts.malloc_canaries = 0; -- cgit v1.2.3-55-g6feb