Bug#443822: I've found a fix (for: hex-a-hop: Got bt from a segfault :D)

Gerfried Fuchs rhonda at deb.at
Sat Nov 22 17:45:52 UTC 2008


* Gerfried Fuchs <rhonda at deb.at> [2008-11-22 18:33:00 CET]:
>  Hmm, there is one message it spits out over and over again though:
> 
> ==10317== Source and destination overlap in memcpy(0x48AE628, 0x48AE62C, 2556)
> ==10317==    at 0xFFBCF94: memcpy (mc_replace_strmem.c:402)
> ==10317==    by 0x872B024E: ???
> ==10317==    by 0xFF11D10: (within /usr/lib/libSDL-1.2.so.0.11.1)
> ==10317==    by 0xFF29468: SDL_LowerBlit (in /usr/lib/libSDL-1.2.so.0.11.1)
> ==10317==    by 0xFF29680: SDL_UpperBlit (in /usr/lib/libSDL-1.2.so.0.11.1)
> ==10317==    by 0x1002148C: HexPuzzle::Render() (hex_puzzzle.cpp:2629)
> ==10317==    by 0x10004260: main (gfx.cpp:402)
> 
>  That line in hex_puzzzle.cpp says:
>     SDL_BlitSurface(screen, &src, screen, &dst);
> 
>  It's the only call to that function with twice the same argument
> (screen) in the whole source - might that be anything important?

 Got a crash now:

==10317== More than 10000000 total errors detected.  I'm not reporting any more.
==10317== Final error counts will be inaccurate.  Go fix your program!
==10317== Rerun with --error-limit=no to disable this cutoff.  Note
==10317== that errors may occur in your program without prior warning from
==10317== Valgrind, because errors are no longer being displayed.
==10317== 
==10317== 
==10317== Process terminating with default action of signal 11 (SIGSEGV)
==10317==  Bad permissions for mapped region at address 0x6383000
==10317==    at 0xFFBDE74: memmove (mc_replace_strmem.c:517)
==10317==    by 0x10012298: RenderObject::Wipe() (hex_puzzzle.cpp:611)
==10317==    by 0x100123E8: WorldRenderer::Wipe() (hex_puzzzle.cpp:686)
==10317==    by 0x1001E978: HexPuzzle::ResetLevel() (hex_puzzzle.cpp:1719)
==10317==    by 0x1001D63C: HexPuzzle::_LoadSave(_IO_FILE*, bool) (hex_puzzzle.cpp:2109)
==10317==    by 0x1001D8B0: HexPuzzle::LoadSave(char const*, bool) (hex_puzzzle.cpp:1900)
==10317==    by 0x1001FD20: HexPuzzle::HandleKey(int, int) (hex_puzzzle.cpp:3985)
==10317==    by 0x100223D0: HexPuzzle::KeyPressed(int, int) (hex_puzzzle.cpp:3914)
==10317==    by 0x10004858: main (gfx.cpp:562)

valgrind: m_mallocfree.c:210 (get_bszB_as_is): Assertion 'bszB_lo == bszB_hi' failed.
valgrind: Heap block lo/hi size mismatch: lo = 3, hi = 65536.
Probably caused by overrunning/underrunning a heap block's bounds.

==10317==    at 0x38020714: report_and_quit (m_libcassert.c:140)
==10317==    by 0x38020A80: vgPlain_assert_fail (m_libcassert.c:200)
==10317==    by 0x3802C044: vgPlain_arena_free (m_mallocfree.c:207)
==10317==    by 0x380419F4: vgPlain_cli_free (replacemalloc_core.c:108)
==10317==    by 0x38002274: die_and_free_mem (mc_malloc_wrappers.c:122)
==10317==    by 0x38044A28: vgPlain_scheduler (scheduler.c:1269)
==10317==    by 0x3802901C: final_tidyup (m_main.c:2107)
==10317==    by 0x380291CC: shutdown_actions_NORETURN (m_main.c:1942)
==10317==    by 0x3805B06C: run_a_thread_NORETURN (syswrap-linux.c:144)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable
==10317==    at 0xFFBA62C: free (vg_replace_malloc.c:323)
==10317==    by 0xFB2379C: __gconv_close (gconv_close.c:56)
==10317==    by 0xFC39210: _nl_unload_domain (loadmsgcat.c:1290)
==10317==    by 0xFC39150: _nl_finddomain_subfreeres (finddomain.c:183)
==10317==    by 0xFC38A04: free_mem (gconv_db.c:836)
==10317==    by 0xFC3955C: __libc_freeres (set-freeres.c:47)
==10317==    by 0xFFDF228: _vgnU_freeres (vg_preloaded.c:60)
==10317==    by 0x10012298: RenderObject::Wipe() (hex_puzzzle.cpp:611)

 Hope that helps. :)
Rhonda





More information about the Pkg-games-devel mailing list