Re: port-amiga/60617: elf2bb crashes

"Michael van Elst via gnats" <[email protected]>
Newsgroups gmane.os.netbsd.bugs
Message-ID <[email protected]>
The following reply was made to PR port-amiga/60617; it has been noted by GNATS.

From: [email protected] (Michael van Elst)
To: [email protected]
Cc: 
Subject: Re: port-amiga/60617: elf2bb crashes
Date: Tue, 18 Aug 2026 04:10:52 -0000 (UTC)

 [email protected] ("[email protected] via gnats") writes:
 
 >06:42:36.787 [release 2026-08-10 04:08:45] tsz = 0x84f0, dsz = 0x88, bsz = 0xd4, total 0x864c
 ...
 >06:42:36.907 [release 2026-08-10 04:08:45] 0x1d40:realloc(): invalid next size
 >06:42:36.907 [release 2026-08-10 04:08:45] Aborted (core dumped)
 >06:42:36.907 [release 2026-08-10 04:08:45] 
 >06:42:36.907 [release 2026-08-10 04:08:45] *** Failed target:  boot.amiga
 
 
 This looks like a miscalculation of the bootblock size.
 
 Index: elf2bb.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c,v
 retrieving revision 1.30
 diff -p -u -r1.30 elf2bb.c
 --- elf2bb.c    29 Apr 2022 07:12:42 -0000      1.30
 +++ elf2bb.c    18 Aug 2026 04:07:10 -0000
 @@ -226,7 +226,7 @@ main(int argc, char *argv[])
                  * But if it is not the case in the future, format for
                  * relocation table should be modified.
                  */
 -               bbsize = roundup(tsz + dsz, 512);
 +               bbsize = roundup(tsz + dsz + bsz, 512);
                 sumsize = bbsize / 512;
         } else {
                 /*
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.