Fatal warnings in client code
Lawrence D'Oliveiro
ldo at geek-central.gen.nz
Mon Mar 6 22:18:39 UTC 2023
On Mon, 06 Mar 2023 22:52:32 +0100, René J.V. Bertin wrote:
> ... I wouldn't use an OS in which a central library calls abort every
> time one of its functions gets called with an invalid argument.
From the man page for mallopt(3)
<https://manpages.debian.org/bullseye/manpages-dev/mallopt.3.en.html>:
MALLOC_CHECK_ -- This environment variable controls the same
parameter as mallopt() M_CHECK_ACTION.
For which:
Bit 1 -- If this bit is set, then, after printing any error message
specified by bit 0, the program is terminated by calling abort(3).
In glibc versions since 2.4, if bit 0 is also set, then, between
printing the error message and aborting, the program also prints a
stack trace in the manner of backtrace(3), and prints the process's
memory mapping in the style of /proc/[pid]/maps (see proc(5)).
You have to admit, memory allocation is about as “central” as you can
get.
More information about the dbus
mailing list