Gentoo Archives: gentoo-user

From: Nikos Chantziaras <realnc@×××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: How do I turn off glibc's runtime error checks?
Date: Sat, 02 Jul 2011 01:19:54
Message-Id: iulrjq$6bd$1@dough.gmane.org
In Reply to: [gentoo-user] How do I turn off glibc's runtime error checks? by Nikos Chantziaras
1 On 07/02/2011 03:05 AM, Nikos Chantziaras wrote:
2 > This is driving me nuts. Since a few days ago, glibc will abort programs
3 > with a:
4 >
5 > *** glibc detected *** program: free(): invalid pointer: ... ***
6 >
7 > or similar error message. I have no idea which package was updated that
8 > triggered this. I did *not* emerge glibc (qlop confirms that I emerged
9 > glibc 3 months ago.)
10 >
11 > The crashing programs *are* buggy. The problem is that I can't shut up
12 > glibc and prevent it from interfering. It's extremely annoying and I
13 > feel the urge to kill baby bunnies. Please help!
14
15 Argh, I found the problem in an unlikely place. It's KDE 4.7 RC1 (!).
16 It seems there's an environment variable called MALLOC_CHECK_ that
17 instructs glibc to perform runtime checks on every program that runs.
18
19 kde-base/kdebase-startkde-4.6.90 installs a /usr/bin/startkde that sets
20 MALLOC_CHECK_=3. This results in every program that runs after starting
21 KDM to be runtime checked. It also makes the system slower (Kwin here
22 felt very sluggish and I also got a hefty performance loss when running
23 another OS in a virtual machine.)
24
25 Note to others running 4.7 RC1: setting MALLOC_CHECK_=0 does not solve
26 the performance problem; glibc still checks, but just doesn't abort or
27 print errors. To get rid of this, you need to edit /usr/bin/startkde
28 and remove the 'if' section that sets MALLOC_CHECK_.

Replies

Subject Author
Re: [gentoo-user] Re: How do I turn off glibc's runtime error checks? "Ivan T. Ivanov" <iivanov@××××××.com>