Subject: Re: toolchain/36607: nbmakefs crash in netbsd-4 tools
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Greg A. Woods <woods@planix.com>
List: netbsd-bugs
Date: 07/05/2007 19:00:10
The following reply was made to PR toolchain/36607; it has been noted by GNATS.

From: "Greg A. Woods" <woods@planix.com>
To: NetBSD GNATS <gnats-bugs@NetBSD.org>
Cc: <toolchain-manager@netbsd.org>, <gnats-admin@netbsd.org>
Subject: Re: toolchain/36607: nbmakefs crash in netbsd-4 tools
Date: Thu, 05 Jul 2007 14:58:27 -0400

 --pgp-sign-Multipart_Thu_Jul__5_14:58:26_2007-1
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 
 At Thu,  5 Jul 2007 13:55:02 +0000 (UTC), Christos Zoulas wrote:
 Subject: Re: toolchain/36607: nbmakefs crash in netbsd-4 tools
 >=20
 >  Can you please try the one from head?
 
 I was almost ready to try that some weeks ago as I had been poking
 around at makefs to try to see how it was setting various informational
 fields in a CD image.
 
 Indeed the code from -current works flawlessly -- no more crash.
 
 Perhaps you could request a pull-up to netbsd-4?
 
 I had to patch the Makefile so that it would build in the netbsd-4
 environment.
 
 Index: usr.sbin/makefs/Makefile
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvs/master/m-NetBSD/main/src/usr.sbin/makefs/Makefile,v
 retrieving revision 1.21
 diff -u -r1.21 Makefile
 --- usr.sbin/makefs/Makefile	16 Dec 2006 12:59:17 -0000	1.21
 +++ usr.sbin/makefs/Makefile	5 Jul 2007 17:42:13 -0000
 @@ -27,6 +27,13 @@
  		${.CURDIR}/cd9660 ${CD9660SRC} \
  		${MKNODSRC} ${MTREESRC}
 =20
 +.if exists(${NETBSDSRCDIR}/bin/ls/stat_flags.c)
 +SRCS+=3D		stat_flags.c
 +CPPFLAGS+=3D	-I${NETBSDSRCDIR}/bin/ls
 +CPPFLAGS+=3D	-DNEED_STAT_FLAGS -DNO_SHA2
 +.PATH:		${NETBSDSRCDIR}/bin/ls
 +.endif
 +
  .if (${HOSTPROG:U} =3D=3D "")
  DPADD+=3D ${LIBUTIL}
  LDADD+=3D -lutil
 Index: usr.sbin/makefs/README.woods
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: usr.sbin/makefs/README.woods
 diff -N usr.sbin/makefs/README.woods
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ usr.sbin/makefs/README.woods	5 Jul 2007 17:29:58 -0000
 @@ -0,0 +1,7 @@
 +Keep makefs up-to-date
 +
 +	cd /usr/src-current/usr.sbin/makefs
 +	cvs -q update
 +
 +	find . -type f ! -name '*~' ! -name '.#*' -print -o -name CVS -prune | pa=
 x -rw /usr/src/usr.sbin/makefs
 +	find . -type f ! -name '*~' ! -name '.#*' -print -o -name CVS -prune | pa=
 x -rw /usr/src-4/usr.sbin/makefs
 
 
 Here are the other things I was poking at:
 
 
 Index: usr.sbin/makefs/cd9660.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvs/master/m-NetBSD/main/src/usr.sbin/makefs/cd9660.c,v
 retrieving revision 1.19
 diff -u -r1.19 cd9660.c
 --- usr.sbin/makefs/cd9660.c	7 Apr 2007 17:14:58 -0000	1.19
 +++ usr.sbin/makefs/cd9660.c	11 Jun 2007 04:11:10 -0000
 @@ -226,13 +226,13 @@
  	/* Make sure the PVD is clear */
  	memset(&diskStructure.primaryDescriptor, 0, 2048);
 =20
 -	memset(diskStructure.primaryDescriptor.volume_set_id,	0x20,32);
 +	memset(diskStructure.primaryDescriptor.volume_set_id,	0x20,32);/* XXX sho=
 uld be 128, as below!?!?!? */
  	memset(diskStructure.primaryDescriptor.publisher_id,	0x20,128);
  	memset(diskStructure.primaryDescriptor.preparer_id,	0x20,128);
  	memset(diskStructure.primaryDescriptor.application_id,	0x20,128);
 -	memset(diskStructure.primaryDescriptor.copyright_file_id, 0x20,128);
 -	memset(diskStructure.primaryDescriptor.abstract_file_id, 0x20,128);
 -	memset(diskStructure.primaryDescriptor.bibliographic_file_id, 0x20,128);
 +	memset(diskStructure.primaryDescriptor.copyright_file_id, 0x20,128); /* X=
 XX should be 37 */
 +	memset(diskStructure.primaryDescriptor.abstract_file_id, 0x20,128); /* XX=
 X should be 37 */
 +	memset(diskStructure.primaryDescriptor.bibliographic_file_id, 0x20,128); =
 /* XXX should be 37 */
 =20
  	strcpy(diskStructure.primaryDescriptor.system_id,"NetBSD");
 =20
 @@ -649,11 +649,11 @@
  	cd9660_pad_string_spaces(diskStructure.primaryDescriptor.application_id,
  	    128);
  	cd9660_pad_string_spaces(
 -	    diskStructure.primaryDescriptor.copyright_file_id, 128);
 +	    diskStructure.primaryDescriptor.copyright_file_id, 128);	/* 128? shou=
 ld be 37 according to ECMA-119! */
  	cd9660_pad_string_spaces(
 -		diskStructure.primaryDescriptor.abstract_file_id, 128);
 +		diskStructure.primaryDescriptor.abstract_file_id, 128);	/* 128?  should =
 be 37 according to ECMA-119! */
  	cd9660_pad_string_spaces(
 -		diskStructure.primaryDescriptor.bibliographic_file_id, 128);
 +		diskStructure.primaryDescriptor.bibliographic_file_id, 128); /* 128? sho=
 uld be 37 according to ECMA-119! */
 =20
  	/* Setup dates */
  	time(&tim);
 Index: usr.sbin/makefs/makefs.8
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvs/master/m-NetBSD/main/src/usr.sbin/makefs/makefs.8,v
 retrieving revision 1.28
 diff -u -r1.28 makefs.8
 --- usr.sbin/makefs/makefs.8	13 Apr 2007 04:12:55 -0000	1.28
 +++ usr.sbin/makefs/makefs.8	11 Jun 2007 03:42:55 -0000
 @@ -277,6 +277,8 @@
  Allow multiple dots in a filename.
  .It Sy applicationid
  Application ID of the image.
 +There is space for 128 characters of information to be written into the
 +ISO volume header.
  .It Sy boot-load-segment
  Set load segment for the boot image.
  .It Sy bootimage
 @@ -296,7 +298,9 @@
  Don't throw away images whose write was aborted due to an error.
  For debugging purposes.
  .It Sy label
 -Label name of the image.
 +The volume ID of the image, often used as the mount point or icon label.
 +There is space for 32 characters of information to be written into the
 +ISO volume header.
  .It Sy no-boot
  Boot image is not bootable.
  .It Sy no-emul-boot
 @@ -309,12 +313,18 @@
  .\" Unknown
  .It Sy preparer
  Preparer ID of the image.
 +There is space for 128 characters of information to be written into the
 +ISO volume header.
  .It Sy publisher
  Publisher ID of the image.
 +There is space for 128 characters of information to be written into the
 +ISO volume header.
  .It Sy rockridge
  Use RockRidge extensions (for longer filenames, etc.).
  .It Sy volumeid
  Volume set identifier of the image.
 +There is space for 128 characters of information to be written into the
 +ISO volume header.
  .El
  .Sh SEE ALSO
  .Xr strsuftoll 8 ,
 
 
 
 --=20
 						Greg A. Woods
 
 H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <woods@robohack.ca>
 Planix, Inc. <woods@planix.com>       Secrets of the Weird <woods@weird.com>
 
 --pgp-sign-Multipart_Thu_Jul__5_14:58:26_2007-1
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 
 -----BEGIN PGP SIGNATURE-----
 Version: PGPfreeware 5.0i for non-commercial use
 MessageID: t3mduIh/hKFW0HmbLGkjetDZJxYDXywi
 
 iQA/AwUBRo0/UmZ9cbd4v/R/EQKchwCgr4SPOu1BGp9p/4eheqAPPdyWEccAoL6P
 hB5L31ichjGiABQlC2hU7RiU
 =jbMv
 -----END PGP SIGNATURE-----
 
 --pgp-sign-Multipart_Thu_Jul__5_14:58:26_2007-1--