This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: glibc crashes: realloc(): invalid next size


the code actually consists of 3 fairly simple and short classes that are
compiled and used on another system (different compiler and OS).
not possible (not worth the effort anyway) to go for x86.
one thing I did experience earlier during runtime, with one of the classes,
is that calling a specific method of the class crashes the system; changing
the order of declaration of methods within the class (which should have no
effect whatsoever) 'fixed' this. I'm almost possitive now that it was
another symptom of the same root cause of the current glibc crash during
linking.

cheers
Shamir Stein-Ackerman
SW team leader
FibroLAN ltd.
Tel: +972-4-959-1717/x117
Fax: +972-4-959-1718
Mobile: +972-52-599-3003
Skype: shamirstein
MSN Messenger: shamirstein@hotmail.com
www.fibrolan.com



-----Original Message-----
From: Andrew Haley [mailto:aph@redhat.com] 
Sent: Monday, June 23, 2008 1:52 PM
To: Shamir Stein
Cc: gcc-help@gcc.gnu.org
Subject: Re: glibc crashes: realloc(): invalid next size

Shamir Stein wrote:
> 
> I'm using gcc with eCos OS on an ARM926 platform (embedded variant).
> I have an entire application written in C which compiles perfectly.
> I recently started adding C++ code to the application and at some point
> glibc began crashing with the following message:
> *** glibc detected ***
>
/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/l
> d: realloc(): invalid next size: 0x096f2358 *** if I remove the C++
modules
> from the makefile, the problem disappears, so I guess I'm misusing gcc.
> what am I doing wrong here?

In the absence of the actual code it's hard to tell.

I don't suppose it's possible for you to run the code on an x86 platform,
is it?  If you could do that, you could find the bug with Valgrind.

Andrew.


> I'm using the same make rules for all sources.
> 
> help here will be appreciated as I'm already considering moving to C.
> 
> 
> 
> cheers
> Shamir Stein-Ackerman
> SW team leader
> FibroLAN ltd.
> Tel: +972-4-959-1717/x117
> Fax: +972-4-959-1718
> Mobile: +972-52-599-3003
> Skype: shamirstein
> MSN Messenger: shamirstein@hotmail.com
> www.fibrolan.com
> 
> 
> 
> 
> 
> 
> 
> 
> 




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]