Changeset 0d2cd10 for lib/Makefile

Timestamp:
2018-03-26T16:48:32Z (7 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
230f6f1
Parents:
e1e5bd6
git-author:
dequis <dx@…> (26-03-18 16:26:56)
git-committer:
dequis <dx@…> (26-03-18 16:48:32)
Message:

Write backtrace to /var/lib/bitlbee/crash.log on SIGSEGV

Async-signal-safe code is very restricted (nothing that may call malloc
indirectly), so this code tries its best to show meaningful stuff, but
the output is still fairly raw. The contents of the log file are:

  • BITLBEE_VERSION, BITLBEE_CONFIGURE_ARGS
  • Backtrace as generated by backtrace()/backtrace_symbols_fd()
  • A small help text explaining how to get more useful symbol names
  • Memory maps (/proc/self/maps), which also mentions loaded plugins

The backtrace() function is a GNU extension, /proc/ is a linux thing.
Non-glibc platforms (such as musl) won't show anything, non-linux
platforms will skip the memory maps when /proc/self/maps fails to open.

I'd like to include timestamps, but I can't find a safe way to format
them. Even turning raw unix timestamps to strings is hard. Fun stuff.

I used the config directory because it's the only place we can be sure
we can write to. The filename is hardcoded for the same reason there are
no timestamps.

(No files)

Note: See TracChangeset for help on using the changeset viewer.