The problems I have having:
First of all, my system is Ubuntu 9.10, AMD64, used to work fine.
Warnings: (I'm a 'should compile clean, no warnings', kind of guy..)
Code: Select all
oricutron$ make
gcc -c main.c -o main.o -Wall -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
gcc -c 6502.c -o 6502.o -Wall -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
gcc -c machine.c -o machine.o -Wall -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
gcc -c gui.c -o gui.o -Wall -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
gui.c: In function ‘gimg_load’:
gui.c:247: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result
In file included from /usr/include/string.h:640,
from gui.c:29:
In function ‘strncat’,
inlined from ‘joinpath’ at gui.c:755:
/usr/include/bits/string3.h:153: warning: call to __builtin___strncat_chk might overflow destination buffer
In function ‘strncat’,
inlined from ‘joinpath’ at gui.c:755,
inlined from ‘insertdisk’ at gui.c:774:
/usr/include/bits/string3.h:153: warning: call to __builtin___strncat_chk might overflow destination buffer
In function ‘strncat’,
inlined from ‘joinpath’ at gui.c:755,
inlined from ‘inserttape’ at gui.c:764:
/usr/include/bits/string3.h:153: warning: call to __builtin___strncat_chk might overflow destination buffer
gcc -c font.c -o font.o -Wall -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
gcc -c monitor.c -o monitor.o -Wall -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
gcc -c via.c -o via.o -Wall -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
via.c: In function ‘tape_ticktock’:
via.c:202: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result
via.c:204: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result
gcc -c 8912.c -o 8912.o -Wall -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
gcc -c disk.c -o disk.o -Wall -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
gcc -c filereq_sdl.c -o filereq.o -Wall -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
filereq_sdl.c: In function ‘filereq_scan’:
filereq_sdl.c:170: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result
filereq_sdl.c:185: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result
gcc -c msgbox_sdl.c -o msgbox.o -Wall -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
gcc -c avi.c -o avi.o -Wall -O3 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
g++ -o oricutron main.o 6502.o machine.o gui.o font.o monitor.o via.o 8912.o disk.o filereq.o msgbox.o avi.o -lm -L/usr/lib -lSDL
Code: Select all
*** glibc detected *** ./oricutron: free(): invalid pointer: 0x0000000001d728d0 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f7d2aa1edd6]
/lib/libc.so.6(cfree+0x6c)[0x7f7d2aa2374c]
./oricutron[0x40bf05]
./oricutron[0x4026d2]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f7d2a9c7abd]
./oricutron[0x4019d9]
======= Memory map: ========
00400000-00430000 r-xp 00000000 08:05 13230121 /home/w1x/hak/oric/oriculator.j/oricutron/oricutron
0062f000-00630000 r--p 0002f000 08:05 13230121 /home/w1x/hak/oric/oriculator.j/oricutron/oricutron
00630000-00634000 rw-p 00030000 08:05 13230121 /home/w1x/hak/oric/oriculator.j/oricutron/oricutron
00634000-006b5000 rw-p 00000000 00:00 0
01cc5000-01db5000 rw-p 00000000 00:00 0 [heap]
7f7d20000000-7f7d20021000 rw-p 00000000 00:00 0
7f7d20021000-7f7d24000000 ---p 00000000 00:00 0
7f7d26c96000-7f7d26c97000 ---p 00000000 00:00 0
7f7d26c97000-7f7d27497000 rw-p 00000000 00:00 0
7f7d27497000-7f7d2749b000 r-xp 00000000 08:05 8316 /usr/lib/alsa-lib/libasound_module_rate_speexrate.so
7f7d2749b000-7f7d2769a000 ---p 00004000 08:05 8316 /usr/lib/alsa-lib/libasound_module_rate_speexrate.so
7f7d2769a000-7f7d2769b000 r--p 00003000 08:05 8316 /usr/lib/alsa-lib/libasound_module_rate_speexrate.so
7f7d2769b000-7f7d2769c000 rw-p 00004000 08:05 8316 /usr/lib/alsa-lib/libasound_module_rate_speexrate.so
7f7d2769c000-7f7d276ac000 rw-s 00000000 00:09 229381 /SYSV0056a4d6 (deleted)
7f7d276ac000-7f7d277d8000 rw-s 00000000 00:09 5341244 /SYSV00000000 (deleted)
7f7d277d8000-7f7d277d9000 ---p 00000000 00:00 0
7f7d277d9000-7f7d27fd9000 rw-p 00000000 00:00 0
7f7d27fd9000-7f7d27fe5000 r-xp 00000000 08:05 17303939 /lib/libnss_files-2.10.1.so
7f7d27fe5000-7f7d281e4000 ---p 0000c000 08:05 17303939 /lib/libnss_files-2.10.1.so
7f7d281e4000-7f7d281e5000 r--p 0000b000 08:05 17303939 /lib/libnss_files-2.10.1.so
7f7d281e5000-7f7d281e6000 rw-p 0000c000 08:05 17303939 /lib/libnss_files-2.10.1.so
7f7d281e6000-7f7d281f0000 r-xp 00000000 08:05 17303941 /lib/libnss_nis-2.10.1.so
7f7d281f0000-7f7d283ef000 ---p 0000a000 08:05 17303941 /lib/libnss_nis-2.10.1.so
7f7d283ef000-7f7d283f0000 r--p 00009000 08:05 17303941 /lib/libnss_nis-2.10.1.so
7f7d283f0000-7f7d283f1000 rw-p 0000a000 08:05 17303941 /lib/libnss_nis-2.10.1.so
7f7d283f1000-7f7d28407000 r-xp 00000000 08:05 17303936 /lib/libnsl-2.10.1.so
7f7d28407000-7f7d28607000 ---p 00016000 08:05 17303936 /lib/libnsl-2.10.1.so
7f7d28607000-7f7d28608000 r--p 00016000 08:05 17303936 /lib/libnsl-2.10.1.so
7f7d28608000-7f7d28609000 rw-p 00017000 08:05 17303936 /lib/libnsl-2.10.1.so
7f7d28609000-7f7d2860b000 rw-p 00000000 00:00 0
7f7d2860b000-7f7d28612000 r-xp 00000000 08:05 17303937 /lib/libnss_compat-2.10.1.so
7f7d28612000-7f7d28812000 ---p 00007000 08:05 17303937 /lib/libnss_compat-2.10.1.so
7f7d28812000-7f7d28813000 r--p 00007000 08:05 17303937 /lib/libnss_compat-2.10.1.so
7f7d28813000-7f7d28814000 rw-p 00008000 08:05 17303937 /lib/libnss_compat-2.10.1.so
7f7d28814000-7f7d28819000 r-xp 00000000 08:05 26903160 /usr/lib/libXfixes.so.3.1.0
7f7d28819000-7f7d28a18000 ---p 00005000 08:05 26903160 /usr/lib/libXfixes.so.3.1.0
7f7d28a18000-7f7d28a19000 r--p 00004000 08:05 26903160 /usr/lib/libXfixes.so.3.1.0
7f7d28a19000-7f7d28a1a000 rw-p 00005000 08:05 26903160 /usr/lib/libXfixes.so.3.1.0
7f7d28a1a000-7f7d28a23000 r-xp 00000000 08:05 26903139 /usr/lib/libXrender.so.1.3.0
7f7d28a23000-7f7d28c22000 ---p 00009000 08:05 26903139 /usr/lib/libXrender.so.1.3.0
7f7d28c22000-7f7d28c23000 r--p 00008000 08:05 26903139 /usr/lib/libXrender.so.1.3.0
7f7d28c23000-7f7d28c24000 rw-p 00009000 08:05 26903139 /usr/lib/libXrender.so.1.3.0
7f7d28c24000-7f7d28c2d000 r-xp 00000000 08:05 26903169 /usr/lib/libXcursor.so.1.0.2
7f7d28c2d000-7f7d28e2c000 ---p 00009000 08:05 26903169 /usr/lib/libXcursor.so.1.0.2
7f7d28e2c000-7f7d28e2d000 r--p 00008000 08:05 26903169 /usr/lib/libXcursor.so.1.0.2
7f7d28e2d000-7f7d28e2e000 rw-p 00009000 08:05 26903169 /usr/lib/libXcursor.so.1.0.2
7f7d28e2e000-7f7d28e7b000 rw-p 00000000 00:00 0
7f7d28e85000-7f7d28e96000 r-xp 00000000 08:05 26904977 /usr/lib/libXext.so.6.4.0
7f7d28e96000-7f7d29095000 ---p 00011000 08:05 26904977 /usr/lib/libXext.so.6.4.0
7f7d29095000-7f7d29096000 r--p 00010000 08:05 26904977 /usr/lib/libXext.so.6.4.0
7f7d29096000-7f7d29097000 rw-p 00011000 08:05 26904977 /usr/lib/libXext.so.6.4.0
7f7d29097000-7f7d2909c000 r-xp 00000000 08:05 26906246 /usr/lib/libXdmcp.so.6.0.0
7f7d2909c000-7f7d2929b000 ---p 00005000 08:05 26906246 /usr/lib/libXdmcp.so.6.0.0
7f7d2929b000-7f7d2929c000 rw-p 00004000 08:05 26906246 /usr/lib/libXdmcp.so.6.0.0
7f7d2929c000-7f7d2929e000 r-xp 00000000 08:05 26903569 /usr/lib/libXau.so.6.0.0
7f7d2929e000-7f7d2949d000 ---p 00002000 08:05 26903569 /usr/lib/libXau.so.6.0.0
7f7d2949d000-7f7d2949e000 r--p 00001000 08:05 26903569 /usr/lib/libXau.so.6.0.0
7f7d2949e000-7f7d2949f000 rw-p 00002000 08:05 26903569 /usr/lib/libXau.so.6.0.0
7f7d2949f000-7f7d294ba000 r-xp 00000000 08:05 26903573 /usr/lib/libxcb.so.1.1.0
7f7d294ba000-7f7d296b9000 ---p 0001b000 08:05 26903573 /usr/lib/libxcb.so.1.1.0
7f7d296b9000-7f7d296ba000 r--p 0001a000 08:05 26903573 /usr/lib/libxcb.so.1.1.0
7f7d296ba000-7f7d296bb000 rw-p 0001b000 08:05 26903573 /usr/lib/libxcb.so.1.1.0
7f7d296bb000-7f7d297ec000 r-xp 00000000 08:05 26903575 /usr/lib/libX11.so.6.2.0
7f7d297ec000-7f7d299ec000 ---p 00131000 08:05 26903575 /usr/lib/libX11.so.6.2.0
7f7d299ec000-7f7d299ed000 r--p 00131000 08:05 26903575 /usr/lib/libX11.so.6.2.0
7f7d299ed000-7f7d299f1000 rw-p 00132000 08:05 26903575 /usr/lib/libX11.so.6.2.0
7f7d299f1000-7f7d299f8000 r-xp 00000000 08:05 17303946 /lib/librt-2.10.1.so
7f7d299f8000-7f7d29bf7000 ---p 00007000 08:05 17303946 /lib/librt-2.10.1.so
7f7d29bf7000-7f7d29bf8000 r--p 00006000 08:05 17303946 /lib/librt-2.10.1.so
7f7d29bf8000-7f7d29bf9000 rw-p 00007000 08:05 17303946 /lib/librt-2.10.1.so
7f7d29bf9000-7f7d29c10000 r-xp 00000000 08:05 17303944 /lib/libpthread-2.10.1.so
7f7d29c10000-7f7d29e0f000 ---p 00017000 08:05 17303944 /lib/libpthread-2.10.1.so
7f7d29e0f000-7f7d29e10000 r--p 00016000 08:05 17303944 /lib/libpthread-2.10.1.so
7f7d29e10000-7f7d29e11000 rw-p 00017000 08:05 17303944 /lib/libpthread-2.10.1.so
7f7d29e11000-7f7d29e15000 rw-p 00000000 00:00 0
7f7d29e15000-7f7d29e2e000 r-xp 00000000 08:05 26903123 /usr/lib/libdirect-1.2.so.0.7.0
7f7d29e2e000-7f7d2a02d000 ---p 00019000 08:05 26903123 /usr/lib/libdirect-1.2.so.0.7.0
7f7d2a02d000-7f7d2a02e000 r--p 00018000 08:05 26903123 /usr/lib/libdirect-1.2.so.0.7.0
7f7d2a02e000-7f7d2a02f000 rw-p 00019000 08:05 26903123 /usr/lib/libdirect-1.2.so.0.7.0
7f7d2a02f000-7f7d2a030000 rw-p 00000000 00:00 0
7f7d2a030000-7f7d2a039000 r-xp 00000000 08:05 26903125 /usr/lib/libfusion-1.2.so.0.7.0
7f7d2a039000-7f7d2a238000 ---p 00009000 08:05 26903125 /usr/lib/libfusion-1.2.so.0.7.0
7f7d2a238000-7f7d2a239000 r--p 00008000 08:05 26903125 /usr/lib/libfusion-1.2.so.0.7.0
7f7d2a239000-7f7d2a23a000 rw-p 00009000 08:05 26903125 /usr/lib/libfusion-1.2.so.0.7.0
7f7d2a23a000-7f7d2a2c1000 r-xp 00000000 08:05 26903124 /usr/lib/libdirectfb-1.2.so.0.7.0
7f7d2a2c1000-7f7d2a4c0000 ---p 00087000 08:05 26903124 /usr/lib/libdirectfb-1.2.so.0.7.0
7f7d2a4c0000-7f7d2a4c2000 r--p 00086000 08:05 26903124 /usr/lib/libdirectfb-1.2.so.0.7.0
7f7d2a4c2000-7f7d2a4c4000 rw-p 00088000 08:05 26903124 /usr/lib/libdirectfb-1.2.so.0.7.0
7f7d2a4c4000-7f7d2a4c5000 rw-p 00000000 00:00 0
7f7d2a4c5000-7f7d2a4c7000 r-xp 00000000 08:05 17303933 /lib/libdl-2.10.1.so
7f7d2a4c7000-7f7d2a6c7000 ---p 00002000 08:05 17303933 /lib/libdl-2.10.1.so
7f7d2a6c7000-7f7d2a6c8000 r--p 00002000 08:05 17303933 /lib/libdl-2.10.1.so
7f7d2a6c8000-7f7d2a6c9000 rw-p 00003000 08:05 17303933 /lib/libdl-2.10.1.so
7f7d2a6c9000-7f7d2a7a3000 r-xp 00000000 08:05 10313836 /usr/lib/libasound.so.2.0.0
7f7d2a7a3000-7f7d2a9a2000 ---p 000da000 08:05 10313836 /usr/lib/libasound.so.2.0.0
7f7d2a9a2000-7f7d2a9a8000 r--p 000d9000 08:05 10313836 /usr/lib/libasound.so.2.0.0
7f7d2a9a8000-7f7d2a9a9000 rw-p 000df000 08:05 10313836 /usr/lib/libasound.so.2.0.0
7f7d2a9a9000-7f7d2ab0f000 r-xp 00000000 08:05 17303930 /lib/libc-2.10.1.so
7f7d2ab0f000-7f7d2ad0e000 ---p 00166000 08:05 17303930 /lib/libc-2.10.1.so
7f7d2ad0e000-7f7d2ad12000 r--p 00165000 08:05 17303930 /lib/libc-2.10.1.so
7f7d2ad12000-7f7d2ad13000 rw-p 00169000 08:05 17303930 /lib/libc-2.10.1.so
7f7d2ad13000-7f7d2ad18000 rw-p 00000000 00:00 0
7f7d2ad18000-7f7d2ad2e000 r-xp 00000000 08:05 17301526 /lib/libgcc_s.so.1
7f7d2ad2e000-7f7d2af2d000 ---p 00016000 08:05 17301526 /lib/libgcc_s.so.1
7f7d2af2d000-7f7d2af2e000 r--p 00015000 08:05 17301526 /lib/libgcc_s.so.1
7f7d2af2e000-7f7d2af2f000 rw-p 00016000 08:05 17301526 /lib/libgcc_s.so.1
7f7d2af2f000-7f7d2afb1000 r-xp 00000000 08:05 17303934 /lib/libm-2.10.1.so
7f7d2afb1000-7f7d2b1b1000 ---p 00082000 08:05 17303934 /lib/libm-2.10.1.so
7f7d2b1b1000-7f7d2b1b2000 r--p 00082000 08:05 17303934 /lib/libm-2.10.1.so
7f7d2b1b2000-7f7d2b1b3000 rw-p 00083000 08:05 17303934 /lib/libm-2.10.1.so
7f7d2b1b3000-7f7d2b2a5000 r-xp 00000000 08:05 26902885 /usr/lib/libstdc++.so.6.0.13
7f7d2b2a5000-7f7d2b4a5000 ---p 000f2000 08:05 26902885 /usr/lib/libstdc++.so.6.0.13
7f7d2b4a5000-7f7d2b4ac000 r--p 000f2000 08:05 26902885 /usr/lib/libstdc++.so.6.0.13
7f7d2b4ac000-7f7d2b4ae000 rw-p 000f9000 08:05 26902885 /usr/lib/libstdc++.so.6.0.13
7f7d2b4ae000-7f7d2b4c3000 rw-p 00000000 00:00 0
7f7d2b4c3000-7f7d2b52c000 r-xp 00000000 08:05 1941515 /usr/lib/libSDL-1.2.so.0.11.2
7f7d2b52c000-7f7d2b72b000 ---p 00069000 08:05 1941515 /usr/lib/libSDL-1.2.so.0.11.2
7f7d2b72b000-7f7d2b72c000 r--p 00068000 08:05 1941515 /usr/lib/libSDL-1.2.so.0.11.2
7f7d2b72c000-7f7d2b72e000 rw-p 00069000 08:05 1941515 /usr/lib/libSDL-1.2.so.0.11.2
7f7d2b72e000-7f7d2b75a000 rw-p 00000000 00:00 0
7f7d2b75a000-7f7d2b779000 r-xp 00000000 08:05 17301518 /lib/ld-2.10.1.so
7f7d2b77c000-7f7d2b813000 rw-p 00000000 00:00 0
7f7d2b813000-7f7d2b852000 r--p 00000000 08:05 26928736 /usr/lib/locale/en_US.utf8/LC_CTYPE
7f7d2b852000-7f7d2b93f000 r--p 00000000 08:05 451627 /usr/lib/locale/en_US.utf8/LC_COLLATE
7f7d2b93f000-7f7d2b945000 rw-p 00000000 00:00 0
7f7d2b946000-7f7d2b951000 rw-p 00000000 00:00 0
7f7d2b951000-7f7d2b961000 rw-s 00000000 00:0f 5670 /dev/snd/pcmC0D0p
7f7d2b961000-7f7d2b962000 rw-s 81000000 00:0f 5670 /dev/snd/pcmC0D0p
7f7d2b962000-7f7d2b963000 r--s 80000000 00:0f 5670 /dev/snd/pcmC0D0p
7f7d2b963000-7f7d2b964000 rw-s 00000000 00:09 196612 /SYSV0056a4d5 (deleted)
7f7d2b964000-7f7d2b965000 r--p 00000000 08:05 26928737 /usr/lib/locale/en_US.utf8/LC_NUMERIC
7f7d2b965000-7f7d2b966000 r--p 00000000 08:05 26927228 /usr/lib/locale/en_US.utf8/LC_TIME
7f7d2b966000-7f7d2b967000 r--p 00000000 08:05 26928200 /usr/lib/locale/en_US.utf8/LC_MONETARY
7f7d2b967000-7f7d2b968000 r--p 00000000 08:05 26928742 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
7f7d2b968000-7f7d2b969000 r--p 00000000 08:05 26928743 /usr/lib/locale/en_US.utf8/LC_PAPER
7f7d2b969000-7f7d2b96a000 r--p 00000000 08:05 26928744 /usr/lib/locale/en_US.utf8/LC_NAME
7f7d2b96a000-7f7d2b96b000 r--p 00000000 08:05 26928201 /usr/lib/locale/en_US.utf8/LC_ADDRESS
7f7d2b96b000-7f7d2b96c000 r--p 00000000 08:05 26928202 /usr/lib/locale/en_US.utf8/LC_TELEPHONE
7f7d2b96c000-7f7d2b96d000 r--p 00000000 08:05 26928747 /usr/lib/locale/en_US.utf8/LC_MEASUREMENT
7f7d2b96d000-7f7d2b974000 r--s 00000000 08:05 9748484 /usr/lib/gconv/gconv-modules.cache
7f7d2b974000-7f7d2b975000 r--p 00000000 08:05 26928205 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION
7f7d2b975000-7f7d2b978000 rw-p 00000000 00:00 0
7f7d2b978000-7f7d2b979000 r--p 0001e000 08:05 17301518 /lib/ld-2.10.1.so
7f7d2b979000-7f7d2b97a000 rw-p 0001f000 08:05 17301518 /lib/ld-2.10.1.so
7fff73491000-7fff73504000 rw-p 00000000 00:00 0 [stack]
7fff735ff000-7fff73600000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted
.. this is only through the menu, though. If I load the tape from the cmd-line, no problems ..
Just thought I should report this in case its a simple fix/unknown bug on my platform.
[/code]