-current amd64 sometimes dumps core when creating a FAT32 image. Minimal reproducer below; other FS types, sizes or files are stable, FAT32 seems to be the culprit. I don't have time to look into this.
$ cd /usr/src/*bin/makefs $ make DEBUG=-g $ mkdir empty/ $ until ! ./obj/makefs -t msdos -o fat_type=32 -s 257M ./empty.img ./empty/ ; do true ; done [...] Takes a few seconds/retries at most for me. Creating `./empty.img' ./empty.img: 525272 sectors in 65659 FAT32 clusters (4096 bytes/cluster) MBR type: 11 bps=512 spc=8 res=32 nft=2 mid=0xf0 spt=63 hds=255 hid=0 bsec=526336 bspf=513 rdcl=2 infs=1 bkbs=2 Segmentation fault (core dumped) $ egdb -q ./obj/makefs ./makefs.core -batch -ex bt [New process 372642] Core was generated by `makefs'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x000008b6b4acb899 in msdosfs_mount (devvp=0x7be6c6083870, flags=<optimized out>) at /s/usr.sbin/makefs/msdos/msdosfs_vfsops.c:287 287 && !memcmp(fp->fsisig4, "\0\0\125\252", 4)) #0 0x000008b6b4acb899 in msdosfs_mount (devvp=0x7be6c6083870, flags=<optimized out>) at /s/usr.sbin/makefs/msdos/msdosfs_vfsops.c:287 #1 0x000008b6b4ac64fb in msdos_makefs (image=0x7be6c6083bcc "./empty.img", dir=0x7be6c6083bdc "./empty/", root=0x8b927f57660, fsopts=0x7be6c60838d0) at /s/usr.sbin/makefs/msdos.c:149 #2 0x000008b6b4ab6343 in main (argc=2, argv=<optimized out>) at /s/usr.sbin/makefs/makefs.c:211 It always chokes on fp->fsisig4.