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

Bug#915194: gcc-8-cross: mips64el-linux-gnuabi64-gcc-8 munmap_chunk(): invalid pointer when build for o32



YunQiang Su <wzssyqa@gmail.com> 于2018年12月2日周日 上午1:46写道:
>
> On Sun, 2 Dec 2018 00:30:21 +0800 YunQiang Su <wzssyqa@gmail.com> wrote:
> > Package: src:gcc-8-cross
> > Version: 23
> >
> > These bellow cmd will show:
> >   munmap_chunk(): invalid pointer
> >   Aborted
> >

I know what's the problem of this patch:

prefix_info.name = (const char *) prefixed_name;

this line change the address of prefix_info.name on fly,
and when the compile process finish, it will try to be free,
and then this problem happens.

I have no clear idea about how to fix it yet.

>
> And an new discovery: i386 version don't have problem...,
> aka only amd64 version has problem.
>
> > $ echo "int a(){ return 1; }" | mips64el-linux-gnuabi64-gcc-8 -c -mabi=32 -xc -
> > $ echo "int a(){ return 1; }" | mips64el-linux-gnuabi64-gcc-8 -B
> > /non_exists/ -c -mabi=32 -xc -
> > $ echo "int a(){ return 1; }" | mips64el-linux-gnuabi64-gcc-8 -B
> > /usr/share -c -mabi=32 -xc -
> > $ echo "int a(){ return 1; }" | mips64el-linux-gnuabi64-gcc-8 -EB -c
> > -mabi=32 -xc -
> >
> >
> > Some other example that work well
> >
> > $ echo "int a(){ return 1; }" | mips64el-linux-gnuabi64-gcc-8 -c -mabi=n32 -xc -
> > $  # works well, use abi=n32
> >
> > $ echo "int a(){ return 1; }" | mips64el-linux-gnuabi64-gcc-8 -c -mabi=64 -xc -
> > $  # works well, use abi=64
> >
> > $ echo "int a(){ return 1; }" | mips64el-linux-gnuabi64-gcc-8 -B
> > /usr/mips64el-linux-gnuabi64/bin/ -c -mabi=32 -xc -
> > $ # works well, add -B option
> >
> > $ echo "int a(){ return 1; }" | mips64el-linux-gnuabi64-gcc-8 -B
> > /usr/bin/ -c -mabi=32 -xc -
> > $ # works well,  add -B option
> >
> > $ echo "int a(){ return 1; }" | mips64-linux-gnuabi64-gcc-8 -c -mabi=32 -xc -
> > $ # works well,  add  use mips64 aka eb
> >
> > $ echo "int a(){ return 1; }" | mips64-linux-gnuabi64-gcc-8  -EL -c
> > -mabi=32 -xc -
> > $ # works well,  add  use mips64 aka eb, and with -EL option.
> >
> > Is it an upstream bug?
> >
> > --
> > YunQiang Su
> >
> >



-- 
YunQiang Su


Reply to: