[hatari-devel] Avena : Sonolumineszenz
Laurent Sallafranque
laurent.sallafranque at free.fr
Sun Apr 19 21:25:47 CEST 2009
Here is the Valgrind trace (don't hesitate to ask me some more if needed).
I've taken it with the following parameters:
dsp emu,
14 Mo,
falcon machine (68020 + copro),
blitter,
Slower but more compatible CPU
Real time clock emulation
Patch Timer-D
Slow down FDC emulation
Tos 4.04 French
Screen : use borders, Zoom St low
Frame skip : auto
Screen RGB
Sound HIGH
I've used When Dream Become Reality demo.
laurent at OrdiLolo:~/Atari/hatari/src$ valgrind --tool=memcheck ./hatari
--dsp emu
==9023== Memcheck, a memory error
detector.
==9023== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
al.
==9023== Using LibVEX rev 1854, a library for dynamic binary
translation.
==9023== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks
LLP.
==9023== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation
framework.
==9023== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==9023== For more details, rerun with:
-v
==9023==
Configuration file /etc/hatari.cfg not
found.
Hatari devel (Apr 19 2009), compiled on: Apr 19 2009,
16:13:23
Building CPU table for configuration: 68EC020/881 (compatible
mode)
==9023== Conditional jump or move depends on uninitialised
value(s)
==9023== at 0x5E88D6C: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E81D77: snd_pcm_dmix_open (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E824E4: _snd_pcm_dmix_open (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E50B71: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E51216: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E512E0: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E8C3D7: _snd_pcm_softvol_open (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E50B71: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E51327: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E6BCB7: _snd_pcm_plug_open (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E50B71: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E51327: (within
/usr/lib/libasound.so.2.0.0)
==9023==
==9023== Conditional jump or move depends on uninitialised
value(s)
==9023== at 0x5E80827: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E8274A: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E516C4: snd_pcm_close (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E8BCB7: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E8C55F: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E516C4: snd_pcm_close (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E6C03C: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E516C4: snd_pcm_close (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x4E604BE: (within
/usr/lib/libSDL-1.2.so.0.11.1)
==9023== by 0x4E33A6B: SDL_AudioInit (in
/usr/lib/libSDL-1.2.so.0.11.1)
==9023== by 0x4E32A14: SDL_InitSubSystem (in
/usr/lib/libSDL-1.2.so.0.11.1)
==9023== by 0x404A98: Audio_Init
(audio.c:106)
==9023==
==9023== Conditional jump or move depends on uninitialised
value(s)
==9023== at 0x5E88B7E: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E82752: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E516C4: snd_pcm_close (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E8BCB7: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E8C55F: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E516C4: snd_pcm_close (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E6C03C: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E516C4: snd_pcm_close (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x4E604BE: (within
/usr/lib/libSDL-1.2.so.0.11.1)
==9023== by 0x4E33A6B: SDL_AudioInit (in
/usr/lib/libSDL-1.2.so.0.11.1)
==9023== by 0x4E32A14: SDL_InitSubSystem (in
/usr/lib/libSDL-1.2.so.0.11.1)
==9023== by 0x404A98: Audio_Init
(audio.c:106)
==9023==
==9023== Thread
2:
==9023== Source and destination overlap in memcpy(0x86E9490, 0x86E9490,
8192)
==9023== at 0x4C271DA: memcpy
(mc_replace_strmem.c:402)
==9023== by 0x5E52A27: snd_pcm_area_copy (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E52D8B: snd_pcm_areas_copy (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E8DA40: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E5DA30: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E677EC: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E6789F: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E679CC: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E5BBBA: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E50661: (within
/usr/lib/libasound.so.2.0.0)
==9023== by 0x5E5BE09: snd_pcm_mmap_writei (in
/usr/lib/libasound.so.2.0.0)
==9023== by 0x4E5FCEB: (within
/usr/lib/libSDL-1.2.so.0.11.1)
Hard drive emulation, C: <->
/media/Jeux/Jeux/Atari.
Dsp: Stack:
0
Dsp: Stack:
0
Dsp: Stack:
0
Dsp: Stack:
0
Dsp: Stack:
0
Dsp: Stack:
0
Dsp: Stack:
0
Dsp: Stack:
0
Dsp: Stack:
4
Dsp: Stack:
8
Dsp: Stack:
12
Dsp: Stack
Overflow
Dsp: Stack:
12
Dsp: Stack
Overflow
Dsp: Stack:
13
Dsp: 0x24d5: 0x000020 unknown
instruction
==9023==
==9023== ERROR SUMMARY: 19412 errors from 4 contexts (suppressed: 1101
from 5)
==9023== malloc/free: in use at exit: 4,091,668 bytes in 5,832
blocks.
==9023== malloc/free: 26,643 allocs, 20,811 frees, 8,152,724 bytes
allocated.
==9023== For counts of detected errors, rerun with:
-v
==9023== searching for pointers to 5,832 not-freed
blocks.
==9023== checked 29,796,960
bytes.
==9023==
==9023== LEAK
SUMMARY:
==9023== definitely lost: 484 bytes in 16
blocks.
==9023== possibly lost: 65,608 bytes in 912
blocks.
==9023== still reachable: 4,025,576 bytes in 4,904
blocks.
==9023== suppressed: 0 bytes in 0 blocks.
==9023== Rerun with --leak-check=full to see details of leaked memory.
Regards,
Laurent
Eero Tamminen a écrit :
> Hi,
>
> (CC'ing to list as the debugging information could be of interest to others
> too.)
>
> On Sunday 19 April 2009, Laurent Sallafranque wrote:
>
>> Actually, I'm searching 2 known bugs:
>>
>> 1 graphical bug in Hmmm
>> 1 stack error in When Dreams Become Reality
>>
>> I wish they'll finish to debug the DSP ;)
>>
>
> I've been testing "Built-in Obsolescence" more and it's quite random how
> long it runs and whether it bombs at startup. It works differently on
> different invocations with the same options.
>
> I tried using GCC -fstack-protector(-all) compile option to get a warning
> about (some) possible stack overwrites at run-time, see:
> http://en.wikipedia.org/wiki/Stack-smashing_protection#GCC_Stack-Smashing_Protector_.28ProPolice.29
>
> But that didn't reveal anything. Maybe it doesn't catch overwrites
> to global structures, only to function local (stack) structures.
>
>
> As you have a faster machine, you could try running Hatari under
> "valgrind --tool=memcheck" in case the DSP stuff corrupts Hatari internal
> (heap) memory.
>
> For that to work for detecting DSP stack overwrites you could allocate
> the DSP CPU structure dynamically (to heap) in dsp.c instead of it being
> a static structure and move the stack member to the end of the structure.
>
> Btw. if you do that change, Duma could also be used and it's much faster
> than Valgrind:
> http://duma.sourceforge.net/
>
> Like Valgrind, Duma is available in Debian. Instead of showing an error
> backtrace, it causes the process to segfault at faulty access. You can
> then use Gdb to debug the internal Hatari state.
>
>
> - Eero
>
>
>
More information about the hatari-devel
mailing list