Subject: toolchain/30611: as segfaults
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Magnus Henoch <mange@freemail.hu>
List: netbsd-bugs
Date: 06/27/2005 14:07:00
>Number: 30611
>Category: toolchain
>Synopsis: as segfaults
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jun 27 14:07:00 +0000 2005
>Originator: Magnus Henoch
>Release: NetBSD 3.99.6
>Organization:
>Environment:
System: NetBSD zemdatav 3.99.6 NetBSD 3.99.6 (IBOOKFAN) #1: Sun Jun 19 14:30:18 CEST 2005 magnus@zemdatav:/usr/obj/sys/arch/macppc/compile/IBOOKFAN macppc
Architecture: powerpc
Machine: macppc
>Description:
While compiling GNU Emacs from CVS on macppc, as gets a
segfault while alloc.c is being compiled.
>How-To-Repeat:
I've tried to get a minimal test case from the assembler
input. Save the following to alloc.s and run "as -o alloc.o
alloc.s". as segfaults, which it shouldn't.
.file "alloc.c"
.file 1 "/home/magnus/noarchive/src/emacs-arch/src/alloc.c"
.section .debug_abbrev,"",@progbits
.Ldebug_abbrev0:
.section .debug_info,"",@progbits
.Ldebug_info0:
.section .debug_line,"",@progbits
.Ldebug_line0:
.section ".text"
.Ltext0:
.file 2 "/usr/include/powerpc/int_types.h"
.file 3 "/usr/include/powerpc/types.h"
.file 4 "/usr/include/powerpc/ansi.h"
.file 5 "/usr/include/sys/ansi.h"
.file 6 "/usr/include/sys/types.h"
.file 7 "/usr/include/sys/endian.h"
.file 8 "/usr/include/sys/fd_set.h"
.file 9 "/usr/include/pthread_types.h"
.file 10 "/usr/include/sys/sigtypes.h"
.file 11 "/usr/include/powerpc/signal.h"
.file 12 "/usr/include/powerpc/frame.h"
.file 13 "/usr/include/sys/siginfo.h"
.file 14 "/usr/include/powerpc/mcontext.h"
.file 15 "/usr/include/sys/ucontext.h"
.file 16 "/usr/include/sys/signal.h"
.file 17 "/usr/include/stdlib.h"
.file 18 "/usr/include/stdio.h"
.file 19 "/home/magnus/noarchive/src/emacs-arch/src/lisp.h"
.file 20 "/home/magnus/noarchive/src/emacs-arch/src/process.h"
.file 21 "/usr/X11R6/include/X11/X.h"
.file 22 "/usr/include/stddef.h"
.file 23 "/usr/X11R6/include/X11/Xlib.h"
.file 24 "/usr/X11R6/include/X11/Xutil.h"
.file 25 "/usr/X11R6/include/X11/Xresource.h"
.file 26 "/usr/X11R6/include/X11/Intrinsic.h"
.file 27 "/usr/X11R6/include/X11/Core.h"
.file 28 "/usr/X11R6/include/X11/Composite.h"
.file 29 "/usr/X11R6/include/X11/Constraint.h"
.file 30 "/usr/X11R6/include/X11/Object.h"
.file 31 "/usr/X11R6/include/X11/RectObj.h"
.file 32 "/home/magnus/noarchive/src/emacs-arch/src/dispextern.h"
.file 33 "/home/magnus/noarchive/src/emacs-arch/src/intervals.h"
.file 34 "/home/magnus/noarchive/src/emacs-arch/src/composite.h"
.file 35 "/home/magnus/noarchive/src/emacs-arch/src/buffer.h"
.file 36 "/home/magnus/noarchive/src/emacs-arch/src/window.h"
.file 37 "/home/magnus/noarchive/src/emacs-arch/src/keyboard.h"
.file 38 "/home/magnus/noarchive/src/emacs-arch/src/frame.h"
.file 39 "/usr/include/sys/time.h"
.file 40 "/usr/include/signal.h"
.file 41 "/usr/include/time.h"
.file 42 "/home/magnus/noarchive/src/emacs-arch/src/atimer.h"
.file 43 "/usr/include/setjmp.h"
.file 44 "/usr/include/unistd.h"
.globl pure
.section ".data"
.align 2
.type pure, @object
.size pure, 1100000
pure:
.long 1
.zero 1099996
.globl staticvec
.align 2
.type staticvec, @object
.size staticvec, 5120
staticvec:
.long Vpurify_flag
.zero 5116
.globl staticidx
.section ".sbss","aw",@nobits
.align 2
staticidx:
.zero 4
.size staticidx, 4
.type staticidx, @object
.section ".text"
.align 2
.globl malloc_warning
.type malloc_warning, @function
malloc_warning:
.LFB21:
.loc 1 488 0
stwu 1,-16(1)
.LCFI0:
.loc 1 489 0
lis 9,pending_malloc_warning@ha
stw 3,pending_malloc_warning@l(9)
addi 1,1,16
blr
.LFE21:
.size malloc_warning, .-malloc_warning
.section .rodata.str1.4,"aMS",@progbits,1
.align 2
.LC0:
.string "display-warning"
.align 2
.LC1:
.string "alloc"
.align 2
.LC2:
.string "emergency"
.section ".text"
.align 2
.globl display_malloc_warning
.type display_malloc_warning, @function
display_malloc_warning:
.LFB23:
.loc 1 497 0
stwu 1,-48(1)
.LCFI1:
.loc 1 498 0
lis 3,.LC0@ha
.loc 1 497 0
mflr 0
.loc 1 498 0
la 3,.LC0@l(3)
.loc 1 497 0
stw 0,52(1)
.LCFI2:
stw 26,24(1)
.LCFI3:
.loc 1 498 0
lis 26,pending_malloc_warning@ha
.loc 1 497 0
stw 27,28(1)
.LCFI4:
stw 28,32(1)
.LCFI5:
stw 29,36(1)
.LCFI6:
.loc 1 498 0
bl intern
mr 27,3
lis 3,.LC1@ha
la 3,.LC1@l(3)
bl intern
mr 28,3
lwz 3,pending_malloc_warning@l(26)
bl build_string
mr 29,3
lis 3,.LC2@ha
la 3,.LC2@l(3)
bl intern
mr 5,29
mr 6,3
mr 4,28
mr 3,27
bl call3
.loc 1 502 0
lwz 29,36(1)
li 0,0
lwz 27,28(1)
stw 0,pending_malloc_warning@l(26)
lwz 0,52(1)
lwz 26,24(1)
lwz 28,32(1)
mtlr 0
addi 1,1,48
blr
.LFE23:
.size display_malloc_warning, .-display_malloc_warning
.align 2
.globl memory_full
.type memory_full, @function
memory_full:
.LFB25:
.loc 1 517 0
stwu 1,-32(1)
.LCFI7:
mflr 0
.loc 1 518 0
lis 9,Qt@ha
lis 11,Vmemory_full@ha
.loc 1 517 0
stw 0,36(1)
.LCFI8:
stw 31,28(1)
.LCFI9:
.loc 1 525 0
lis 31,spare_memory@ha
lwz 3,spare_memory@l(31)
.loc 1 518 0
lwz 10,Qt@l(9)
.loc 1 521 0
lis 9,_bytes_used@ha
.loc 1 525 0
cmpwi 0,3,0
.loc 1 521 0
lwz 0,_bytes_used@l(9)
lis 9,bytes_used_when_full@ha
.loc 1 517 0
stw 30,24(1)
.LCFI10:
.loc 1 518 0
stw 10,Vmemory_full@l(11)
.loc 1 521 0
stw 0,bytes_used_when_full@l(9)
.loc 1 525 0
bne- 0,.L9
.L4:
lis 30,Qnil@ha
lis 31,Vmemory_signal_data@ha
.L8:
.loc 1 534 0
lwz 3,Qnil@l(30)
lwz 4,Vmemory_signal_data@l(31)
bl Fsignal
b .L8
.loc 1 527 0
.L9:
bl free
.loc 1 528 0
li 0,0
stw 0,spare_memory@l(31)
b .L4
.LFE25:
.size memory_full, .-memory_full
.section .rodata.str1.4
.align 2
.LC3:
.string "memory-full-p"
.globl Smemory_full_p
.section ".data"
.align 3
.type Smemory_full_p, @object
.size Smemory_full_p, 24
Smemory_full_p:
.long 16390
.long Fmemory_full_p
.short 0
.short 0
.long .LC3
.long 0
>Fix:
>Unformatted:
Sources from CVS HEAD of June 18.