2018-08-01 17:59:39 UTC
I suspect that dumping core is so rarely helpful in most of the 112 cases where fossil_panic() is currently called in src/* that attaching a debugger is a better plan in those rare cases where something like a backtrace is needed.
I discovered this when running “fossil init” without arguments to get a help message. This makes me wonder how many of those 111 other code paths are going to drop cores for insufficient cause.
I think it’s appropriate for a function called “panic” to drop core. What I’m questioning is that Fossil really has 112 cases where dropping core on exit is the best plan. If all of these can’t move to fossil_fatal() calls, then I guess we need a third “scream and die” function that splits the difference between these two.