bin/94045: [nullfs] dump(8) seg-fault on nullfs

Robert Gogolok gogo at cs.uni-sb.de
Sat Mar 4 07:40:07 PST 2006


The following reply was made to PR bin/94045; it has been noted by GNATS.

From: Robert Gogolok <gogo at cs.uni-sb.de>
To: bug-followup at freebsd.org, pietro.cerutti at gmail.com
Cc:  
Subject: Re: bin/94045: [nullfs] dump(8) seg-fault on nullfs
Date: Sat, 4 Mar 2006 16:36:39 +0100

 Backtrace:
 Program received signal SIGSEGV, Segmentation fault.
 0x2811ddb2 in strcmp () from /lib/libc.so.6
 (gdb) bt
 #0  0x2811ddb2 in strcmp () from /lib/libc.so.6
 #1  0x0804b750 in getmntpt (name=3D0x0, mntflagsp=3D0xbfbfeb5c)=20
 at /usr/src/sbin/dump/main.c:607
 #2  0x0804aa14 in main (argc=3D0, argv=3D0xbfbfec48)=20
 at /usr/src/sbin/dump/main.c:325
 
 
 607 =BB=B7=BB=B7if (!strcmp(mntbuf[i].f_mntfromname, name)) {
 
 The variable 'name' in the method=20
 600 getmntpt(char *name, int *mntflagsp)
 on line 607 hast the value 0.
 
 The value is set in the 'if block' on line 314.
    313 =BB=B7if (dt !=3D NULL) {
     314 =BB=B7=BB=B7disk =3D rawname(dt->fs_spec);
     315 =BB=B7=BB=B7(void)strncpy(spcl.c_dev, dt->fs_spec, NAMELEN);
     316 =BB=B7=BB=B7(void)strncpy(spcl.c_filesys, dt->fs_file, NAMELEN);
     317 =BB=B7} else {
     318 =BB=B7=BB=B7(void)strncpy(spcl.c_dev, disk, NAMELEN);
     319 =BB=B7=BB=B7(void)strncpy(spcl.c_filesys, "an unlisted file system",
     320 =BB=B7=BB=B7    NAMELEN);
     321 =BB=B7}
 
 
 The method rawname returns 0 since on line 667
 
 667 =BB=B7if (stat(cp, &sb) =3D=3D 0 && (sb.st_mode & S_IFMT) =3D=3D S_IFCH=
 R)
 668 =BB=B7=BB=B7return (cp);
 
 the comparision=20
 (sb.st_mode & S_IFMT) =3D=3D S_IFCHR=20
 is not true and the rawname methos returns NULL
 674 =BB=B7return (NULL);


More information about the freebsd-bugs mailing list