The attached patch changes sig_coredump to call a hook. In the fullness of time, the ap_exception_info_t provided to the hook would contain any and all relevant information available to a signal/exception handler (e.g., siginfo_t on many Unix variants).
Here's a compromise that I'd be willing to accept: you have to explictly enable this hook at configure-time. Otherwise, this hook won't be executed on a signal. Doing a directive to execute the hook isn't safe enough because someone could somehow trounce our variable and call the hook. (Actually, I wish the whole cwd so the core ends up in the right place were the same way.)
I'm afraid of a malicious SIGSEGV finding the right space to trampoline off. We've seen it before. But, if they are only enabled explicitly, I'd be a bit more comfortable because it requires an active step to enable it.
We can give 'em the gun, and we can point 'em where the ammo is. But, as long as we don't hand 'em a loaded gun... -- justin
