NetBSD Problem Report #55797

From www@netbsd.org  Sun Nov  8 18:52:20 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 04EA71A9246
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  8 Nov 2020 18:52:20 +0000 (UTC)
Message-Id: <20201108185218.C733D1A9256@mollari.NetBSD.org>
Date: Sun,  8 Nov 2020 18:52:18 +0000 (UTC)
From: innes666@gmail.com
Reply-To: innes666@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Compiler segfault at memcpy() building libgcc addqq3
X-Send-Pr-Version: www-1.0

>Number:         55797
>Category:       port-evbarm
>Synopsis:       Compiler segfault at memcpy() building libgcc addqq3
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-evbarm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 08 18:55:00 +0000 2020
>Last-Modified:  Tue Nov 10 06:15:00 +0000 2020
>Originator:     innes
>Release:        NetBSD-9.1
>Organization:
>Environment:
NetBSD 9.1_STABLE NetBSD 9.1_STABLE (GENERIC) #0: Fri Oct 23 08:41:00 UTC 2020  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC evbarm
>Description:
/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/build/./gcc/xgcc -B/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/build/./gcc/ -nostdinc -B/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/build/arm-none-eabi/newlib/ -isystem /usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/build/arm-none-eabi/newlib/targ-include -isystem /usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/gcc-8.3.0/newlib/libc/include -B/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/build/arm-none-eabi/libgloss/arm -L/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/build/arm-none-eabi/libgloss/libnosys -L/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/gcc-8.3.0/libgloss/arm -B/usr/pkg/cross-arm-none-eabi/arm-none-eabi/bin/ -B/usr/pkg/cross-arm-none-eabi/arm-none-eabi/lib/ -isystem /usr/pkg/cross-arm-none-eabi/arm-none-eabi/include -isystem /usr/pkg/cross-arm-none-eabi/arm-none-eabi/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes 
 -Wold-style-definition  -isystem ./include   -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -fno-inline -I. -I. -I../.././gcc -I/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/gcc-8.3.0/libgcc -I/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/gcc-8.3.0/libgcc/. -I/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/gcc-8.3.0/libgcc/../gcc -I/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/gcc-8.3.0/libgcc/../include  -DHAVE_CC_TLS  -o _fixsfdi.o -MT _fixsfdi.o -MD -MP -MF _fixsfdi.dep -DL_fixsfdi -c /usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/gcc-8.3.0/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/gcc-8.3.0/libgcc/fixed-bit.c: In function '__gnu_addqq3':
/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/gcc-8.3.0/libgcc/fixed-bit.c:63:3: internal compiler error: Segmentation fault
   memcpy (&x, &a, FIXED_SIZE);
   ^~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
gmake[4]: *** [/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/gcc-8.3.0/libgcc/fixed-obj.mk:27: _addQQ.o] Error 1
gmake[4]: Leaving directory '/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/build/arm-none-eabi/thumb/libgcc'
gmake[3]: *** [Makefile:1201: multi-do] Error 1
gmake[3]: Leaving directory '/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/build/arm-none-eabi/libgcc'
gmake[2]: *** [Makefile:125: all-multi] Error 2
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Leaving directory '/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/build/arm-none-eabi/libgcc'
gmake[1]: *** [Makefile:12730: all-target-libgcc] Error 2
gmake[1]: Leaving directory '/usr/pkgsrc-obj/cross/arm-none-eabi-gcc/work/build'
gmake: *** [Makefile:900: all] Error 2
*** Error code 2

Stop.
make[2]: stopped in /usr/pkgsrc/cross/arm-none-eabi-gcc
*** Error code 1

Stop.
make[1]: stopped in /usr/pkgsrc/cross/arm-none-eabi-gcc
*** Error code 1

>How-To-Repeat:
Try to build /usr/pkgsrc/cross/arm-none-eabi-gcc
>Fix:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-evbarm/55797: Compiler segfault at memcpy() building libgcc
 addqq3
Date: Mon, 9 Nov 2020 06:37:10 +0100

 Do you have enough swap space configured? Running out of memory is the #1
 reason for this kind of issues.

 Martin

From: Innes Thoth <innes666@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-evbarm/55797: Compiler segfault at memcpy() building libgcc addqq3
Date: Mon, 9 Nov 2020 23:11:04 +0100

 --00000000000090490f05b3b3db46
 Content-Type: text/plain; charset="UTF-8"

 Servus Martin,

 thank you for your suggestion. This A20 board has 1G of RAM and when trying
 to compile it for the first time it also had 1G of swap. After your reply I
 set swap to 2G, ran make clean and tried to build it again and encountered
 exactly the same error. swapctl -l and top also shows this working swap
 space.

 Could it be because of the following settings in /etc/mk.conf ?  (which
 seemed to work for most packages)

 USE_SSP=yes
 CFLAGS+=-mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon -O2


 On Mon, 9 Nov 2020 at 06:40, Martin Husemann <martin@duskware.de> wrote:

 > The following reply was made to PR port-evbarm/55797; it has been noted by
 > GNATS.
 >
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: port-evbarm/55797: Compiler segfault at memcpy() building
 > libgcc
 >  addqq3
 > Date: Mon, 9 Nov 2020 06:37:10 +0100
 >
 >  Do you have enough swap space configured? Running out of memory is the #1
 >  reason for this kind of issues.
 >
 >  Martin
 >
 >

 --00000000000090490f05b3b3db46
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr"><div dir=3D"ltr">Servus Martin,<br><div><br></div><div>tha=
 nk you for your suggestion. This A20 board has 1G of RAM and when trying to=
  compile it for the first time it also had 1G of swap. After your reply I s=
 et swap to 2G, ran make clean and tried to build it again and encountered e=
 xactly the same error. swapctl -l and top also shows this working swap spac=
 e.<br><br>Could it be because of the following settings in /etc/mk.conf ?=
 =C2=A0 (which seemed to work for most packages)<br><br>USE_SSP=3Dyes<br>CFL=
 AGS+=3D-mcpu=3Dcortex-a7 -mtune=3Dcortex-a7 -mfpu=3Dneon -O2<br></div></div=
 ><div><br></div><div><br></div><div class=3D"gmail_quote"><div dir=3D"ltr" =
 class=3D"gmail_attr">On Mon, 9 Nov 2020 at 06:40, Martin Husemann &lt;<a hr=
 ef=3D"mailto:martin@duskware.de">martin@duskware.de</a>&gt; wrote:<br></div=
 ><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
 -left:1px solid rgb(204,204,204);padding-left:1ex">The following reply was =
 made to PR port-evbarm/55797; it has been noted by GNATS.<br>
 <br>
 From: Martin Husemann &lt;<a href=3D"mailto:martin@duskware.de" target=3D"_=
 blank">martin@duskware.de</a>&gt;<br>
 To: <a href=3D"mailto:gnats-bugs@netbsd.org" target=3D"_blank">gnats-bugs@n=
 etbsd.org</a><br>
 Cc: <br>
 Subject: Re: port-evbarm/55797: Compiler segfault at memcpy() building libg=
 cc<br>
 =C2=A0addqq3<br>
 Date: Mon, 9 Nov 2020 06:37:10 +0100<br>
 <br>
 =C2=A0Do you have enough swap space configured? Running out of memory is th=
 e #1<br>
 =C2=A0reason for this kind of issues.<br>
 <br>
 =C2=A0Martin<br>
 <br>
 </blockquote></div></div>

 --00000000000090490f05b3b3db46--

From: Innes Thoth <innes666@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-evbarm/55797: Compiler segfault at memcpy() building libgcc addqq3
Date: Tue, 10 Nov 2020 07:12:20 +0100

 --000000000000bcf86305b3ba9490
 Content-Type: text/plain; charset="UTF-8"

 So it seems that it built successfully now after disabling the CFLAGS and
 CXXFLAGS in /etc/mk.conf for this built /usr/pkgsrc/cross/arm-none-eabi-gcc

 --000000000000bcf86305b3ba9490
 Content-Type: text/html; charset="UTF-8"

 <div dir="ltr">So it seems that it built successfully now after disabling the CFLAGS and CXXFLAGS in /etc/mk.conf for this built /usr/pkgsrc/cross/arm-none-eabi-gcc<br></div>

 --000000000000bcf86305b3ba9490--

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.