NetBSD Problem Report #45412

From www@NetBSD.org  Fri Sep 30 19:59:32 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 9A2B163CD7F
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 30 Sep 2011 19:59:32 +0000 (UTC)
Message-Id: <20110930195931.2343463BA43@www.NetBSD.org>
Date: Fri, 30 Sep 2011 19:59:31 +0000 (UTC)
From: tworaz666@gmail.com
Reply-To: tworaz666@gmail.com
To: gnats-bugs@NetBSD.org
Subject: arm--netbsdelf-as segfaults when building simple tc
X-Send-Pr-Version: www-1.0

>Number:         45412
>Category:       toolchain
>Synopsis:       arm--netbsdelf-as segfaults when building simple tc
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 30 20:00:01 +0000 2011
>Closed-Date:    Thu Nov 03 01:01:11 +0000 2011
>Last-Modified:  Thu Nov 03 01:01:11 +0000 2011
>Originator:     Piotr Tworek
>Release:        NetBSD 5.1
>Organization:
>Environment:
NetBSD crow 5.1.0_PATCH NetBSD 5.1.0_PATCH (A20p) #0: Mon Aug 22 09:02:54 CEST 2011  tworaz@crow:/usr/obj/sys/arch/i386/compile/A20p i386
>Description:
After updating netbsd current source tree on 30.09.2011 hpcarm compilation fails in lib/csu/arm_elf/crt0.o:

dependall ===> lib/csu/arm_elf
    compile  arm_elf/crt0.o
arm--netbsdelf-gcc: Internal error: Segmentation fault (program as)
Please submit a full bug report.
See <http://www.NetBSD.org/Misc/send-pr.html> for instructions.

*** Failed target:  crt0.o
*** Failed command:
/home/tworaz/devel/NetBSD/src/../tools-hpcarm/bin/arm--netbsdelf-gcc -O2
-mlong-calls -fno-unit-at-a-time -O2 -fPIC -msoft-float -std=gnu99 -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-Wno-sign-compare -Wno-traditional -Wa,--fatal-warnings -Wreturn-type
-Wswitch -Wshadow -Werror
-I/home/tworaz/devel/NetBSD/src/lib/csu/arm_elf -DLIBC_SCCS -DPIC
-DDYNAMIC -DELFSIZE=32 -I/home/tworaz/devel/NetBSD/src/libexec/ld.elf_so
-I/home/tworaz/devel/NetBSD/src/lib/csu/arm_elf/../common_elf
-I/home/tworaz/devel/NetBSD/src/lib/libc/dlfcn -DDWARF2_EH -DJCR
-DDSO_HANDLE
--sysroot=/home/tworaz/devel/NetBSD/src/../obj-hpcarm/destdir.hpcarm -c
-DCRT0 /home/tworaz/devel/NetBSD/src/lib/csu/arm_elf/crt0.c -o crt0.o.o
*** Error code 1

According to the core dump the backtrace is:
#0  0x08074ad1 in arm_cleanup ()
#1  0x0805e32f in read_a_source_file ()
#2  0x0804afeb in perform_an_assembly_pass ()
#3  0x0804bd25 in main ()


>How-To-Repeat:
The simpliest way to reproduce the problem is:
1. Build hpcarm toolchain with: ./build.sh -N 1 -u -U -O ../obj-hpcarm -T ../tools-hpcarm -m hpcarm tools
2. $echo "__asm(\"nop\");" > test.c
3. arm--netbsdelf-gcc test.c -o test.o
>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Thu, 03 Nov 2011 01:01:11 +0000
State-Changed-Why:
christos firxed this a couple of weeks ago. thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.