NetBSD Problem Report #49260

From  Mon Oct  6 07:36:19 2014
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer "Postmaster" (verified OK))
	by (Postfix) with ESMTPS id 9790CA65C6
	for <>; Mon,  6 Oct 2014 07:36:19 +0000 (UTC)
Message-Id: <>
Date: Mon,  6 Oct 2014 09:36:16 +0200 (CEST)
Subject: makefs -t v7fs crash with empty tree
X-Send-Pr-Version: 3.95

>Number:         49260
>Category:       bin
>Synopsis:       makefs -t v7fs crash with empty tree
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 06 07:40:00 +0000 2014
>Originator:     Nicolas Joly
>Release:        NetBSD 7.99.1
Insitut Pasteur
System: NetBSD 7.99.1 NetBSD 7.99.1 (LYNCHE) #0: Fri Oct 3 14:13:42 CEST 2014 amd64
Architecture: x86_64
Machine: amd64
Trying to create a v7fs file system image from an empty directory tree make
the program crash

njoly@lynche [~/tmp]> mkdir empty.tree
njoly@lynche [~/tmp]> makefs -t v7fs image.v7fs empty.tree
Calculated size of `image.v7fs': 2048 bytes, 1 inodes
zsh: segmentation fault (core dumped)  makefs -t v7fs image.v7fs empty.tree
njoly@lynche [~/tmp]> gdb makefs makefs.core
GNU gdb (GDB) 7.7.1
ore was generated by `makefs'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f7ff6d0d17f in memcpy () from /usr/lib/
(gdb) bt
#0  0x00007f7ff6d0d17f in memcpy () from /usr/lib/
#1  0x000000000041bfb3 in write_mmap (ctx=<optimized out>,
    buf=<optimized out>, sector=<optimized out>)
    at /local/src/NetBSD/src/sys/fs/v7fs/v7fs_io_user.c:169
#2  0x000000000041c587 in make_freeblocklist (buf=0x7f7fffffd560 "2",
    listblk=102, fs=0x7f7ff7b07000)
    at /local/src/NetBSD/src/sbin/newfs_v7fs/main.c:190
#3  make_filesystem (fs=0x7f7ff7b07000, volume_size=volume_size@entry=4,
    at /local/src/NetBSD/src/sbin/newfs_v7fs/main.c:259
#4  0x000000000041c732 in v7fs_newfs (mount=mount@entry=0x7f7fffffd850,
    maxfile=<optimized out>)
    at /local/src/NetBSD/src/sbin/newfs_v7fs/main.c:304
#5  0x0000000000409286 in v7fs_makefs (image=0x7f7ffffffcf7 "image.v7fs",
    dir=0x7f7ffffffd02 "empty.tree", root=0x7f7ff7b0b080,
    fsopts=0x7f7fffffd900) at /local/src/NetBSD/src/usr.sbin/makefs/v7fs.c:147
#6  0x0000000000428c7a in main (argc=<optimized out>, argv=0x7f7fffffdaa8)
    at /local/src/NetBSD/src/usr.sbin/makefs/makefs.c:305

mkdir empty.tree
makefs -t v7fs image.v7fs empty.tree

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.