This is the mail archive of the gcc-patches@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: PATCH RFA: Add -static-libstdc++ option to g++


NightStrike <nightstrike@gmail.com> writes:

>> That revision breaks the linux64 to win64 cross compiler for g++. ÂAny
>> attempt to use g++ results in output like this:
>>
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412c0 ***
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412a0 ***
>> *** glibc detected *** corrupted double-linked list: 0x00000000005412b0 ***
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412c0 ***
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412a0 ***
>> *** glibc detected *** corrupted double-linked list: 0x00000000005412c0 ***
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412b0 ***
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412b0 ***
>> *** glibc detected *** corrupted double-linked list: 0x00000000005412c0 ***
>> libtool.m4: error: problem compiling CXX test program
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412b0 ***

The patch in question is fairly short, and only affects the g++ driver
program, specifically g++spec.c.  Can you run that under the debugger
and find out where these problems occur?

Or, see if changing this

  num_args = argc + added + need_math + (library > 0) * 4 + 1;

to this

  num_args = argc + added + need_math + (library > 0) * 4 + 2;

fixed the problem.

Ian


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