On Mon, Mar 14, 2005 at 06:44:09PM -0500, Richard Stallman wrote: > 'abort: core dumped' is not a good user experience. If code is being > shipped with naked aborts in it, that is where the problem lies. > > You're entitled to your opinion, but such a conclusion requires much > stronger basis than this.
As I recall, in the old days you (RMS) used to do user polls on occasion. Would you consider doing it in this case? That is, is it appropriate for the GNU project to place naked aborts in its programs? Or is it preferable to do a bit more work and provide the user with more information in the case of a program crash, even at the price of adding a kilobyte or two to the program's size? > If > cross jumping makes debugging harder, tough -- debugging is hard, > debugging optimized programs is harder. > > There is no room in software development for responding to a bug > report with "tough". That attitude is incompatible with trying to > serve the users. In this discussion it appears that the term "user" is overloaded. RMS appears to be using it to refer to the user of GCC, but I am concerned about the effect on end users. I would not say "tough", as it's impolite. However, I believe that putting a plain "abort()" in a program does not serve the users of that program, cross-jumping or no cross-jumping. This is because almost all the users run stripped binaries, meaning that this discussion is moot to them: they get a mysterious crash that they cannot debug. An abort message that tells the user the exact location of the crash can speed up the communication between user and developer, and may save lots of time if it immediately reveals that the bug report is a duplicate. > Ideally we would satisfy all wishes of all users. That is not > feasible; there are times when we must say no, and for good reason. > But we should never say no when we can easily and painlessly say yes. > (And when we have to say no, we should never say "tough".) But what are you saying to those users who don't like it that GNU programs abort silently when they discover bugs in themselves? Aren't you saying "tough" in a somewhat more polite way? > GCC should handle the case of programs using `abort' in the best way > that is reasonably feasible. GCC should handle each and every case in > the most useful way that is reasonably feasible. > > This case would not be worth a lot of work. But since we know exactly > what would make it better, and it is a small change, there's no reason > not to do it. Yes, it's possible to treat "abort" specially and to avoid crossjumping optimization in that particular case. It is not cost-free, as a test needs to be performed every time there is a candidate for cross-jumping, but for all I know this cost is negligible. We might well want to do it. But it seems to me that the practice of using abort() as it is now used in many GNU programs is a holdover from 20 years ago when the engineering tradeoffs were different. We can afford to tell the user more.