winfsp / cgofuse

Cross-platform FUSE library for Go - Works on Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD
https://winfsp.dev
MIT License
527 stars 84 forks source link

Exception if name passed to --FileSystemName is longer than 12 characters #14

Closed ncw closed 7 years ago

ncw commented 7 years ago

For instance this causes an exception

rclone mount -vv C:\Users\Dev Q: --fuse-flag --FileSystemName=ddddddddddddd

Whereas this doesn't

rclone mount -vv C:\Users\Dev Q: --fuse-flag --FileSystemName=dddddddddddd

The exception I got was

Exception 0xc0000005 0x1 0x2633700 0x72c90007
PC=0x72c90007
signal arrived during external code execution

github.com/billziss-gh/cgofuse/fuse._Cfunc_hostMount(0x8f, 0x1245d680, 0x13195b0, 0x0)
        github.com/billziss-gh/cgofuse/fuse/_obj/_cgo_gotypes.go:402 +0x3f
github.com/billziss-gh/cgofuse/fuse.(*FileSystemHost).Mount.func9(0x1245d680, 0x10, 0x10, 0xf, 0x1245d680, 0x13195b0, 0x0)
        X:/go/src/github.com/billziss-gh/cgofuse/fuse/host.go:1110 +0xf3
github.com/billziss-gh/cgofuse/fuse.(*FileSystemHost).Mount(0x12451f20, 0x12318108, 0x2, 0x12456900, 0xc, 0xc, 0x0)
        X:/go/src/github.com/billziss-gh/cgofuse/fuse/host.go:1110 +0x2e0
github.com/ncw/rclone/cmd/cmount.mount.func1(0x12451f20, 0x12318108, 0x2, 0x12456900, 0xc, 0xc, 0xf2d640, 0x123ada90, 0x1245d640)
        X:/go/src/github.com/ncw/rclone/cmd/cmount/mount.go:253 +0x4d
created by github.com/ncw/rclone/cmd/cmount.mount
        X:/go/src/github.com/ncw/rclone/cmd/cmount/mount.go:259 +0x326

I suspect this is probably a bug in WinFsp rather than cgofuse, but I'm not 100% certain!

You can find an rclone with the --fuse-flag option on the cmount branch if you need to try it for yourself.

billziss-gh commented 7 years ago

Thanks for finding this. At first I could not reproduce it, but this was because I am running WinFsp 1.1 rather than 1.0. This problem was a typo that was fixed in this commit.

Closing as this is not a cgofuse problem and because the problem is already fixed on WinFsp 1.1.