Bug 185225 - Uninformative setting of MALLOC_CHECK_ in startkde
Summary: Uninformative setting of MALLOC_CHECK_ in startkde
Status: RESOLVED FIXED
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dirk Mueller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-22 13:00 UTC by Mark van Rossum
Modified: 2009-07-14 00:14 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark van Rossum 2009-02-22 13:00:58 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    Fedora RPMs

In startkde Malloc_check_ is set to 2, which means that any malloc errors will result in aborting the program.
This setting also applies then to any program called from konsole.

I and others spent substantial time debugging programmes that did not run for this reason and aborted without any message.

I wonder if it is not better to set it to 1, which means that an error message is produced.
The current setting seems over-cautious.
Comment 1 George Kiagiadakis 2009-02-23 13:22:52 UTC
+1. That took me a lot of time too when I was trying to figure out what was causing the following crash in a gnome app (subtitleeditor)...
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507509
Comment 2 George Kiagiadakis 2009-02-23 17:43:59 UTC
I am reassigning the bug to you, Dirk, since you introduced this code in startkde (according to svn blame).
Comment 3 David Faure 2009-02-26 21:48:18 UTC
SVN commit 932527 by dfaure:

Set MALLOC_CHECK_ to 1 in release/relwithdebinfo modes, and 2 only in the other modes (debug etc.)
Otherwise some gnome apps crash more often, says comment #1 in 185225 :-)
Note, however, that any app which crashes with MALLOC_CHECK_=2 is BUGGY and needs to be fixed...
(But indeed in release mode the goal is to minimize crash risks, hence this commit).
BUG: 185225


 M  +9 -0      ConfigureChecks.cmake  
 M  +1 -1      startkde.cmake  


WebSVN link: http://websvn.kde.org/?view=rev&revision=932527
Comment 4 David Faure 2009-02-27 13:40:55 UTC
SVN commit 932766 by dfaure:

Remove this altogether, it was intended to be only in trunk, not in stable branch nor releases, says dirk.
CCBUG: 185225


 M  +0 -8      ConfigureChecks.cmake  
 M  +0 -4      startkde.cmake  


WebSVN link: http://websvn.kde.org/?view=rev&revision=932766
Comment 5 Dario Andres 2009-06-16 14:08:43 UTC
*** Bug 196207 has been marked as a duplicate of this bug. ***
Comment 6 Dario Andres 2009-06-16 14:09:29 UTC
This needs to be fixed on trunk too. Reopening
Comment 7 Dario Andres 2009-06-16 14:14:56 UTC
Closing. I misread David comment about this being activated on trunk on purpose.
Regards
Comment 8 Michael Pyne 2009-06-28 03:33:50 UTC
This check has been removed from the 4.3 release in revision 988394
Comment 9 David Faure 2009-06-29 14:45:26 UTC
r932767 | dfaure | 2009-02-27 13:43:19 +0100 (Fri, 27 Feb 2009) | 3 lines

revert r932525 (=1 leads to a debug msg from glibc on every binary being started, even "ls")
Comment 10 Michael Pyne 2009-07-14 00:14:25 UTC
There is now code in trunk to set MALLOC_CHECK_ to 3 (abort with error message) if glibc is of a recent enough version.