NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amiga/60617: elf2bb crashes



On Mon, 2026-08-17 23:00:00 +0000, jbglaw%lug-owl.de@localhost via gnats <gnats-admin%NetBSD.org@localhost> wrote:

Just to add: I also built elf2bb with -g, valgrind complains:

# valgrind -s /root/netbsd-amiga-manual/_tools_/bin/nbamiga-elf2bb -d -S x.out boot.amiga > /dev/null
==1991054== Memcheck, a memory error detector
==1991054== Copyright (C) 2002-2026, and GNU GPL'd, by Julian Seward et al.
==1991054== Using Valgrind-3.27.1 and LibVEX; rerun with -h for copyright info
==1991054== Command: /root/netbsd-amiga-manual/_tools_/bin/nbamiga-elf2bb -d -S x.out boot.amiga
==1991054== 
==1991054== Invalid write of size 1
==1991054==    at 0x4856833: memcpy@GLIBC_2.2.5 (vg_replace_strmem.c:1152)
==1991054==    by 0x4001770: main (elf2bb.c:261)
==1991054==  Address 0x4a81680 is 0 bytes after a block of size 34,304 alloc'd
==1991054==    at 0x4852FFF: realloc (vg_replace_malloc.c:1741)
==1991054==    by 0x4001E2F: main (elf2bb.c:246)
==1991054== 
==1991054== Invalid write of size 2
==1991054==    at 0x4001DA0: main (elf2bb.c:400)
==1991054==  Address 0x4a81680 is 0 bytes after a block of size 34,304 alloc'd
==1991054==    at 0x4852FFF: realloc (vg_replace_malloc.c:1741)
==1991054==    by 0x4001E2F: main (elf2bb.c:246)
==1991054== 
==1991054== 
==1991054== HEAP SUMMARY:
==1991054==     in use at exit: 69,744 bytes in 4 blocks
==1991054==   total heap usage: 9 allocs, 5 frees, 142,456 bytes allocated
==1991054== 
==1991054== LEAK SUMMARY:
==1991054==    definitely lost: 56 bytes in 1 blocks
==1991054==    indirectly lost: 0 bytes in 0 blocks
==1991054==      possibly lost: 0 bytes in 0 blocks
==1991054==    still reachable: 69,688 bytes in 3 blocks
==1991054==         suppressed: 0 bytes in 0 blocks
==1991054== Rerun with --leak-check=full to see details of leaked memory
==1991054== 
==1991054== ERROR SUMMARY: 66 errors from 2 contexts (suppressed: 0 from 0)
==1991054== 
==1991054== 2 errors in context 1 of 2:
==1991054== Invalid write of size 2
==1991054==    at 0x4001DA0: main (elf2bb.c:400)
==1991054==  Address 0x4a81680 is 0 bytes after a block of size 34,304 alloc'd
==1991054==    at 0x4852FFF: realloc (vg_replace_malloc.c:1741)
==1991054==    by 0x4001E2F: main (elf2bb.c:246)
==1991054== 
==1991054== 
==1991054== 64 errors in context 2 of 2:
==1991054== Invalid write of size 1
==1991054==    at 0x4856833: memcpy@GLIBC_2.2.5 (vg_replace_strmem.c:1152)
==1991054==    by 0x4001770: main (elf2bb.c:261)
==1991054==  Address 0x4a81680 is 0 bytes after a block of size 34,304 alloc'd
==1991054==    at 0x4852FFF: realloc (vg_replace_malloc.c:1741)
==1991054==    by 0x4001E2F: main (elf2bb.c:246)
==1991054== 
==1991054== ERROR SUMMARY: 66 errors from 2 contexts (suppressed: 0 from 0)

Some off-by-one when copying section contents?

MfG, JBG

-- 

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index