| View previous topic :: View next topic |
| Author |
Message |
Archaemic
Joined: 18 Mar 2007 Posts: 38
|
Posted: Sun Nov 16, 2008 7:33 am Post subject: psptoolchain installer buffer overflow |
|
|
Because pspsh wonīt compile on a Mac due to it using some readline methods that seem to only exist on Linux or something (I forget), I tried to install the psptoolchain on Linux in a VM. While building gcc-stage1, it buffer overflowed in the middle, so I canīt continue. Anyone have any insight as to why this is happening and/or what may be broken?
This is the log I have (thereīs more above, but it got cut off in my buffer):
| Code: | ...
_satfractunsUSIQQ.o _satfractunsUSIHQ.o _satfractunsUSISQ.o _satfractunsUSIDQ.o _satfractunsUSITQ.o _satfractunsUSIHA.o _satfractunsUSISA.o _satfractunsUSIDA.o _satfractunsUSITA.o _satfractunsUSIUQQ.o _satfractunsUSIUHQ.o _satfractunsUSIUSQ.o _satfractunsUSIUDQ.o _satfractunsUSIUTQ.o _satfractunsUSIUHA.o _satfractunsUSIUSA.o _satfractunsUSIUDA.o _satfractunsUSIUTA.o _satfractunsUDIQQ.o _satfractunsUDIHQ.o _satfractunsUDISQ.o _satfractunsUDIDQ.o _satfractunsUDITQ.o _satfractunsUDIHA.o _satfractunsUDISA.o _satfractunsUDIDA.o _satfractunsUDITA.o _satfractunsUDIUQQ.o _satfractunsUDIUHQ.o _satfractunsUDIUSQ.o _satfractunsUDIUDQ.o _satfractunsUDIUTQ.o _satfractunsUDIUHA.o _satfractunsUDIUSA.o _satfractunsUDIUDA.o _satfractunsUDIUTA.o _satfractunsUTIQQ.o _satfractunsUTIHQ.o _satfractunsUTISQ.o _satfractunsUTIDQ.o _satfractunsUTITQ.o _satfractunsUTIHA.o _satfractunsUTISA.o _satfractunsUTIDA.o _satfractunsUTITA.o _satfractunsUTIUQQ.o _satfractunsUTIUHQ.o _satfractunsUTIUSQ.o _satfractunsUTIUDQ.o _satfractunsUTIUTQ.o _satfractunsUTIUHA.o _satfractunsUTIUSA.o _satfractunsUTIUDA.o _satfractunsUTIUTA.o unwind-dw2.o unwind-dw2-fde.o unwind-sjlj.o gthr-gnat.o unwind-c.o emutls.o"; \
if test -z "$objects"; then \
echo 'int __libgcc_eh_dummy;' > eh_dummy.c; \
/home/jeffrey/psptoolchain/build/gcc-4.3.2/build-psp/./gcc/xgcc -B/home/jeffrey/psptoolchain/build/gcc-4.3.2/build-psp/./gcc/ -B/usr/local/pspdev/psp/bin/ -B/usr/local/pspdev/psp/lib/ -isystem /usr/local/pspdev/psp/include -isystem /usr/local/pspdev/psp/sys-include -O2 -g -g -O2 -O2 -O2 -g -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -G 0 -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include -DHAVE_CC_TLS -c eh_dummy.c \
-o eh_dummy.o; \
objects=eh_dummy.o; \
fi; \
/usr/local/pspdev/psp/bin/ar rc libgcc.a $objects
*** buffer overflow detected ***: /usr/local/pspdev/psp/bin/ar terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x40127558]
/lib/tls/i686/cmov/libc.so.6[0x40125680]
/lib/tls/i686/cmov/libc.so.6[0x40124d68]
/lib/tls/i686/cmov/libc.so.6(_IO_default_xsputn+0xc8)[0x4009aa18]
/lib/tls/i686/cmov/libc.so.6(_IO_padn+0xed)[0x4008de0d]
/lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x27cf)[0x4006f15f]
/lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xa7)[0x40124e17]
/lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0x40124d5d]
/usr/local/pspdev/psp/bin/ar[0x80512e2]
/usr/local/pspdev/psp/bin/ar[0x804f2db]
/usr/local/pspdev/psp/bin/ar[0x8052158]
/usr/local/pspdev/psp/bin/ar[0x8059e98]
/usr/local/pspdev/psp/bin/ar[0x804b8f5]
/usr/local/pspdev/psp/bin/ar[0x804c690]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0x40043685]
/usr/local/pspdev/psp/bin/ar[0x80496e1]
======= Memory map: ========
08048000-080c5000 r-xp 00000000 08:01 421662 /usr/local/pspdev/psp/bin/ar
080c5000-080c6000 r--p 0007c000 08:01 421662 /usr/local/pspdev/psp/bin/ar
080c6000-080c7000 rw-p 0007d000 08:01 421662 /usr/local/pspdev/psp/bin/ar
080c7000-080cb000 rw-p 080c7000 00:00 0
09284000-0c374000 rw-p 09284000 00:00 0 [heap]
40000000-4001a000 r-xp 00000000 08:01 204416 /lib/ld-2.8.90.so
4001a000-4001b000 r-xp 4001a000 00:00 0 [vdso]
4001b000-4001c000 r--p 0001a000 08:01 204416 /lib/ld-2.8.90.so
4001c000-4001d000 rw-p 0001b000 08:01 204416 /lib/ld-2.8.90.so
4001d000-4001f000 rw-p 4001d000 00:00 0
4001f000-40020000 r--p 00000000 08:01 378245 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
40020000-40027000 r--s 00000000 08:01 361847 /usr/lib/gconv/gconv-modules.cache
40027000-4002d000 rw-p 40027000 00:00 0
4002d000-40185000 r-xp 00000000 08:01 204548 /lib/tls/i686/cmov/libc-2.8.90.so
40185000-40187000 r--p 00158000 08:01 204548 /lib/tls/i686/cmov/libc-2.8.90.so
40187000-40188000 rw-p 0015a000 08:01 204548 /lib/tls/i686/cmov/libc-2.8.90.so
40188000-4018c000 rw-p 40188000 00:00 0
4018c000-401cb000 r--p 00000000 08:01 378239 /usr/lib/locale/en_US.utf8/LC_CTYPE
401cb000-401cf000 rw-p 401cb000 00:00 0
401dd000-401ea000 r-xp 00000000 08:01 204415 /lib/libgcc_s.so.1
401ea000-401eb000 r--p 0000c000 08:01 204415 /lib/libgcc_s.so.1
401eb000-401ec000 rw-p 0000d000 08:01 204415 /lib/libgcc_s.so.1
bfd8e000-bfdab000 rw-p bffe3000 00:00 0 [stack]
/bin/bash: line 7: 27290 Aborted /usr/local/pspdev/psp/bin/ar rc libgcc.a $objects
make[2]: *** [libgcc.a] Error 134
|
E] I see this is a known problem. My mistake.
E2] Switching to gcc-4.2 didn't seem to fix it...
E3] Rebuilding binutils made it work. |
|
| Back to top |
|
 |
Insert_witty_name
Joined: 10 May 2006 Posts: 376
|
Posted: Sun Nov 16, 2008 9:10 am Post subject: Re: psptoolchain installer buffer overflow |
|
|
| Archaemic wrote: | | Because pspsh wonīt compile on a Mac due to it using some readline methods that seem to only exist on Linux or something (I forget) |
Mac's come with there own version of readline. What you need to do is install readline from http://tiswww.case.edu/php/chet/readline/rltop.html and it will work fine. |
|
| Back to top |
|
 |
Archaemic
Joined: 18 Mar 2007 Posts: 38
|
Posted: Sun Nov 16, 2008 9:48 am Post subject: |
|
|
| I installed that a while ago, and three functions still don't seem to be defined. |
|
| Back to top |
|
 |
jsharrad
Joined: 20 Oct 2005 Posts: 102
|
Posted: Sun Nov 16, 2008 4:48 pm Post subject: |
|
|
I also had this problem recently. I got around it by using an older version of GCC.
| Code: | | CC="gcc-4.2" ./toolchain.sh |
Edit: heh, actually nevermind... I guess I should have read your edits :P |
|
| Back to top |
|
 |
Archaemic
Joined: 18 Mar 2007 Posts: 38
|
Posted: Sun Nov 16, 2008 7:25 pm Post subject: |
|
|
| I got pspsh working too, it seems. It appears I was linking against Apple's readline still, despite using GNU's header, hence why it wasn't defined. A quick -L/opt/local/lib flag fixed it :) No more VM necessary, I guess. |
|
| Back to top |
|
 |
|