help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memory allocation bug in g++-4.1.2 and glibc


From: Paul Pluzhnikov
Subject: Re: memory allocation bug in g++-4.1.2 and glibc
Date: Fri, 20 Apr 2007 22:17:06 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

alikin <shahrokni@gmail.com> writes:

> My code has essentially two parts.
> The first part generates some data which is then used to call a
> minimiser function which is not written by me and it has been used
> fairly largely under Windows without any problem. After reading your
> email I seperated those parts by saving the data that caused the glibc
> memory corruption error and then running a small program which read
> the data and called the miniser, in this case, the program does not
> crash!

This is also somewhat typical of heap corruption bugs:
small changes make them go away or re-appear.

> but valgrind returns lots of errors such as:
> Use of uninitialised value of size 4
> Conditional jump or move depends on uninitialised value(s)

These mean you are using (printingf) some uninitialized data.
The are not heap corruption bugs, but they often are not very
healthy either.

> I am not sure if that comes by default with apt-get install? Is there
> a way to check/change its value  when installing glibc using apt-get
> in Debian?

I am not familiar with Debian package management.
You'll probably get better answers in comp.os.linux.development.system,
or in Debian-specific forums.

Regardless, if Debian indeed "ships" with glibc compiled without
frame pointers, then Debian is completely unsuitable for any
development or "production" use.

Finally, there might be a "glibc-debug" package, which might give
you better stack traces.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]