aboutsummaryrefslogtreecommitdiff
path: root/debug.h (unfollow)
Commit message (Collapse)AuthorLines
2026-07-21xmalloc: avoid using reallocarray(3) to implement xreallocarray()Craig Barnes-1/+2
See the added comment for reasoning. The reallocarray(3) function in libc could have been used conditionally, when available, but since it can be implemented simply and efficiently, the portable version may just as well be used in all cases. See also: * https://pubs.opengroup.org/onlinepubs/9799919799/functions/reallocarray.html#:~:text=adding-,reallocarray * https://android.googlesource.com/platform/bionic/+/HEAD/docs/status.md#:~:text=reallocarray * https://github.com/termux/termux-packages/tree/26826aec834182c/x11-packages/foot * https://github.com/termux/termux-packages/blob/26826aec834182c/x11-packages/foot/reallocarray.c#L6 * https://github.com/termux/termux-packages/blob/26826aec834182c/x11-packages/foot/xmalloc.c.patch#L7 * https://github.com/termux/termux-packages/pull/17818 * https://github.com/termux/termux-packages/issues/23833 (see expanded build log)
2021-02-09debug: make use of log_msg() in fatal_error() and bug() functionsCraig Barnes-1/+3
Instead of writing directly to stderr and/or syslog(3).
2021-01-16debug: rename assert() to xassert(), to avoid clashing with <assert.h>Craig Barnes-3/+1
2021-01-16Print stack trace on assert() failure or when calling fatal_error()Craig Barnes-0/+32
Note: this uses the __sanitizer_print_stack_trace() function from the AddressSanitizer runtime, so it only works when AddressSanitizer is in use.
2020-10-10selection: use appropriate check for PRIMARY pasteSergey Nazaryev-33/+0
Assume it could be a copy-paste typo. We should check PRIMARY, not CLIPBOARD. Without this fix, we can't use PRIMARY until we copy anything to CLIPBOARD.