Confidential applications must prevent sensitive data from being written to disk when an application crashes. For some distributions (such as Ubuntu), daemons (apport, whoopsie) collect crash information and send data to the distribution provider (Cononical / Launchpad tracker). What measures can be taken in the application code to reduce this risk regardless of a particular distribution?
In particular, would it be sufficient to disable core dumps at the Linux kernel level so that the distribution (like Ubuntu) never gets core dumps?
struct rlimit limit; limit.rlim_cur = 0; limit.rlim_max = 0; setrlimit(RLIMIT_CORE, &limit)