[Nestedvm] Problem with gcc 3.3.6

Andre Pietsch andre.pietsch at advicio-servdesk.de
Tue May 10 10:49:36 EDT 2011


OK...

I googled it and somone changed the line 1575 in the collect2.c file to:

redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, 0644)

that seemd to work but now I get the following buffer overflow:

------------snip--------------
*** buffer overflow detected ***: mips-unknown-elf-ar terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x2ad20f6bb537]
/lib/libc.so.6(+0xfe3f0)[0x2ad20f6ba3f0]
/lib/libc.so.6(+0xfd859)[0x2ad20f6b9859]
/lib/libc.so.6(_IO_default_xsputn+0xcc)[0x2ad20f631c2c]
/lib/libc.so.6(_IO_padn+0xe8)[0x2ad20f6256e8]
/lib/libc.so.6(_IO_vfprintf+0x2af3)[0x2ad20f604133]
/lib/libc.so.6(__vsprintf_chk+0x99)[0x2ad20f6b98f9]
/lib/libc.so.6(__sprintf_chk+0x7f)[0x2ad20f6b983f]
mips-unknown-elf-ar[0x409824]
mips-unknown-elf-ar[0x407a81]
mips-unknown-elf-ar[0x40a0cd]
mips-unknown-elf-ar[0x40d3f7]
mips-unknown-elf-ar[0x40457f]
mips-unknown-elf-ar[0x404a3d]
mips-unknown-elf-ar[0x4053d2]
/lib/libc.so.6(__libc_start_main+0xfe)[0x2ad20f5dad8e]
mips-unknown-elf-ar[0x401c89]
======= Memory map: ========
00400000-00469000 r-xp 00000000 08:01 214720 
 
/home/andrepietsch/software/nestedvm/upstream/install/bin/mips-unknown-elf-ar
00668000-00669000 r--p 00068000 08:01 214720 
 
/home/andrepietsch/software/nestedvm/upstream/install/bin/mips-unknown-elf-ar
00669000-0066a000 rw-p 00069000 08:01 214720 
 
/home/andrepietsch/software/nestedvm/upstream/install/bin/mips-unknown-elf-ar
0066a000-0066c000 rw-p 00000000 00:00 0
01804000-01ebe000 rw-p 00000000 00:00 0 
  [heap]
2ad20f399000-2ad20f3b9000 r-xp 00000000 08:01 164673 
  /lib/ld-2.12.1.so
2ad20f3b9000-2ad20f3bb000 rw-p 00000000 00:00 0
2ad20f5b9000-2ad20f5ba000 r--p 00020000 08:01 164673 
  /lib/ld-2.12.1.so
2ad20f5ba000-2ad20f5bb000 rw-p 00021000 08:01 164673 
  /lib/ld-2.12.1.so
2ad20f5bb000-2ad20f5bc000 rw-p 00000000 00:00 0
2ad20f5bc000-2ad20f736000 r-xp 00000000 08:01 164665 
  /lib/libc-2.12.1.so
2ad20f736000-2ad20f935000 ---p 0017a000 08:01 164665 
  /lib/libc-2.12.1.so
2ad20f935000-2ad20f939000 r--p 00179000 08:01 164665 
  /lib/libc-2.12.1.so
2ad20f939000-2ad20f93a000 rw-p 0017d000 08:01 164665 
  /lib/libc-2.12.1.so
2ad20f93a000-2ad20f941000 rw-p 00000000 00:00 0
2ad20f941000-2ad20fbe5000 r--p 00000000 08:01 14 
  /usr/lib/locale/locale-archive
2ad20fbe5000-2ad20fbec000 r--s 00000000 08:01 2057 
  /usr/lib/gconv/gconv-modules.cache
2ad20fbec000-2ad20fbf6000 rw-p 00000000 00:00 0
2ad20fc11000-2ad20fc26000 r-xp 00000000 08:01 133437 
  /lib/libgcc_s.so.1
2ad20fc26000-2ad20fe25000 ---p 00015000 08:01 133437 
  /lib/libgcc_s.so.1
2ad20fe25000-2ad20fe26000 r--p 00014000 08:01 133437 
  /lib/libgcc_s.so.1
2ad20fe26000-2ad20fe27000 rw-p 00015000 08:01 133437 
  /lib/libgcc_s.so.1
7ffffaf6a000-7ffffaf8d000 rw-p 00000000 00:00 0 
  [stack]
7ffffafff000-7ffffb000000 r-xp 00000000 00:00 0 
  [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 
  [vsyscall]
make[4]: *** [libgcc.a] Aborted
make[4]: *** Deleting file `libgcc.a'
make[4]: Leaving directory 
`/home/andrepietsch/software/nestedvm/upstream/build/gcc-obj/gcc'
make[3]: *** [stmp-multilib] Error 2
make[3]: Leaving directory 
`/home/andrepietsch/software/nestedvm/upstream/build/gcc-obj/gcc'
make[2]: *** [all-gcc] Error 2
make[2]: Leaving directory 
`/home/andrepietsch/software/nestedvm/upstream/build/gcc-obj'
make[1]: *** [tasks/build_gcc] Error 2
make[1]: Leaving directory `/home/andrepietsch/software/nestedvm/upstream'
make: *** [upstream/tasks/build_gcc] Error 2
-----------------snap--------------

could it be a problem with the 64 bit version of the installed ubuntu?

regards


andre


Am 10.05.2011 16:34, schrieb Andre Pietsch:
> Hi,
>
> I tried to compile nestedVM under cygwin and it worked. Because of
> problems with the project I wanted to "nestVM" I had to switch to
> current ubuntu version. The checkout and start of the compilation worked
> but I get the following error:
>
> In file included from /usr/include/fcntl.h:252,
>                    from ../../gcc-3.3.6/gcc/system.h:208,
>                    from ../../gcc-3.3.6/gcc/collect2.c:30:
> In function "open",
>       inlined from "collect_execute" at ../../gcc-3.3.6/gcc/collect2.c:1575:
> /usr/include/bits/fcntl2.h:51: error: call to "__open_missing_mode"
> declared with attribute error: open with O_CREAT in second argument
> needs 3 arguments
> make[3]: *** [collect2.o] Error 1
> make[3]: Leaving directory
> `/home/andrepietsch/software/nestedvm/upstream/build/gcc-obj/gcc'
> make[2]: *** [all-gcc] Error 2
> make[2]: Leaving directory
> `/home/andrepietsch/software/nestedvm/upstream/build/gcc-obj'
> make[1]: *** [tasks/build_gcc] Error 2
> make[1]: Leaving directory `/home/andrepietsch/software/nestedvm/upstream'
> make: *** [upstream/tasks/build_gcc] Error 2
>
> Has anyone a clue what that means?
>
> Andre



More information about the Nestedvm mailing list