[LV] Status of the toolchain build scripts?

Mikkel Lauritsen mikkel-vax at tala.dk
Tue Jun 19 15:21:47 CEST 2007


Jan-Benedict Glaw <jbglaw at lug-owl.de> wrote:

--- snip ---
>> I have bisected the input file, and as long as there are no more than
>> 1102 lines in it the assembler works fine. Increasing the number of lines
>> causes a segmentation fault, followed by the memory corruption if I
>> increase the size even further.
>
> Is it really depend it on number of lines?  Would be more plausible if
> it was a simple filesize problem.

Oh, agreed - I don't think the number of lines has any significance; the
1103'th line just happens to bring the size above a critical threshold. The
file that makes gas barf has a size of about 17400 bytes, BTW.

>> So - my initial conclusion is that the assembler has a memory management
>> problem, and I'm going to try to see if I can dig deeper into it.
>
> Would you cut'n'paste gas's backtrace? Maybe it's possible to guess
> the cause for the corruption by seeing where it crashes afterwards.

Sure - I hope that the mail client doesn't screw up the longish lines:

(gdb) bt full
#0  0x001760bb in malloc_consolidate () from /lib/libc.so.6
No symbol table info available.
#1  0x0017820d in _int_malloc () from /lib/libc.so.6
No symbol table info available.
#2  0x0017a00e in malloc () from /lib/libc.so.6
No symbol table info available.
#3  0x080b9d48 in xmalloc (size=65538)
    at
/home/mikkel/linux-vax/build/build-20070617-191810-UTC-vax-linux-uclibc/src/binutils/libiberty/xmalloc.c:147
        newmem = <value optimized out>
#4  0x08054e9d in input_scrub_push (saved_position=0x0)
    at
/home/mikkel/linux-vax/build/build-20070617-191810-UTC-vax-linux-uclibc/src/binutils/gas/input-scrub.c:168
No locals.
#5  0x08054edb in input_scrub_include_sb (from=0xbfa60a9c, position=0x0,
is_expansion=0)
    at
/home/mikkel/linux-vax/build/build-20070617-191810-UTC-vax-linux-uclibc/src/binutils/gas/input-scrub.c:276
No locals.
#6  0x0805ee83 in read_a_source_file (name=0xbfa62b32
"/home/mikkel/signal4.asm")
    at
/home/mikkel/linux-vax/build/build-20070617-191810-UTC-vax-linux-uclibc/src/binutils/gas/read.c:1095
        backup = 0x97c7820 "clude/asm/thread_info.h\"1\n mfpr
$0,%r0\n\t.linefile 0\"\"2\n\t.linefile
78\"include/asm/thrad_info.h\"1\n mfpr $0,%r0\n\t.linefile 0\"\"2\n"
        c = <value optimized out>
        s = 0x97d03c0 ""
        temp = <value optimized out>
        pop = <value optimized out>
        last_eol = 0x0
#7  0x0804aaf6 in perform_an_assembly_pass (argc=<value optimized out>,
argv=0x97a62a0)
    at
/home/mikkel/linux-vax/build/build-20070617-191810-UTC-vax-linux-uclibc/src/binutils/gas/as.c:1026
        saw_a_file = 1
        applicable = <value optimized out>
#8  0x0804b868 in main (argc=Cannot access memory at address 0x0
)
    at
/home/mikkel/linux-vax/build/build-20070617-191810-UTC-vax-linux-uclibc/src/binutils/gas/as.c:1141
        keep_it = <value optimized out>
        __PRETTY_FUNCTION__ = "main"


Best regards and thanks
  Mikkel
_______________________________________________
Linux-Vax mailing list
Linux-Vax at pergamentum.com
http://www.pergamentum.com/mailman/listinfo/linux-vax




More information about the Vax-linux mailing list