I'm trying to protect my process from a potential rouge code that might cause a double-free scenario using mallopt(M_CHECK_ACTION, 3).
Is there a way to output the error in case of a double-free to a log file? My process already redirects stderr (i.e "error" calls are logged to a file), but this specific error is printed to the screen.
Try to use LIBC_FATAL_STDERR_ environment variable.
# LIBC_FATAL_STDERR_="yes" ./<you-program-name>