bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/14201] gas 2.19.51, Assertion failure when declaring large arra


From: hjl.tools at gmail dot com
Subject: [Bug gas/14201] gas 2.19.51, Assertion failure when declaring large array: sb_build at /netrel/src/binutils-2.19.51-1/gas/sb.c line 62.
Date: Thu, 07 Jun 2012 17:52:34 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=14201

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2012-06-07 17:52:34 
UTC ---
The failure is OS dependent:

#0  sb_scrub_and_add_sb (ptr=0x8196128, s=0xbfffe670)
    at /net/gnu-6/export/gnu/import/git/binutils/gas/sb.c:102
#1  0x0805b7c4 in input_scrub_include_sb (from=0xbfffe670, 
    position=0x81a097b "", is_expansion=1)
    at /net/gnu-6/export/gnu/import/git/binutils/gas/input-scrub.c:287
#2  0x08065bee in do_repeat (count=-1, start=0x812e9cd "REPT", 
    end=0x812e9c8 "ENDR")
    at /net/gnu-6/export/gnu/import/git/binutils/gas/read.c:3216
#3  0x08065b3d in s_rept (ignore=0)
    at /net/gnu-6/export/gnu/import/git/binutils/gas/read.c:3191
#4  0x08062be9 in read_a_source_file (name=0xbfffea19 "/tmp/x.s")
    at /net/gnu-6/export/gnu/import/git/binutils/gas/read.c:1076
#5  0x0804caa3 in perform_an_assembly_pass (argc=0, argv=0x819c7dc)
    at /net/gnu-6/export/gnu/import/git/binutils/gas/as.c:1095
#6  0x0804cdf0 in main (argc=2, argv=0x819c7d8)
    at /net/gnu-6/export/gnu/import/git/binutils/gas/as.c:1242
(gdb) f 2
#2  0x08065bee in do_repeat (count=-1, start=0x812e9cd "REPT", 
    end=0x812e9c8 "ENDR")
    at /net/gnu-6/export/gnu/import/git/binutils/gas/read.c:3216
3216      input_scrub_include_sb (&many, input_line_pointer, 1);
(gdb) p many
$19 = {
  ptr = 0x37c3c008 "\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte
0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n
.byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte
0\n\n .byte 0\n\n .byte 0\n"..., len = 550502400, max = 1073741824}

While holding a 500M sb, we are allocating another 500M sb.  And
the first 500M sb will be freed right after it:

  input_scrub_include_sb (&many, input_line_pointer, 1);
  sb_kill (&many);

Why not reuse the first 500M sb?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]