Skip to content

fuse_parse_cmdline issues on NetBSD #18

@krytarowski

Description

@krytarowski

I'm getting crashes with squashfuse on NetBSD. I narrowed it down to prototype mismatch between fuse_parse_cmdline() in this package and in system.

During build:

--- libfuseprivate_la-fuseprivate.lo ---
fuseprivate.c: In function 'sqfs_usage':
fuseprivate.c:105:3: warning: implicit declaration of function 'fuse_parse_cmdline' [-Wimplicit-function-declaration]
   fuse_parse_cmdline(&args, NULL, NULL, NULL);

Backtrace

$ gdb --args squashfuse -v                                                                                                                                    
GNU gdb (GDB) 7.12
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from squashfuse...done.
(gdb) r
Starting program: /usr/pkg/bin/squashfuse -v
squashfuse 0.1.100 (c) 2012 Dave Vasilevsky

Usage: /usr/pkg/bin/squashfuse [options] ARCHIVE MOUNTPOINT


Program received signal SIGSEGV, Segmentation fault.
fuse_parse_cmdline (args=0x7f7fff446c90, opts=0x0) at /usr/src/lib/librefuse/refuse_lowlevel.c:125
125		memset(opts, 0, sizeof(*opts));
(gdb) bt
#0  fuse_parse_cmdline (args=0x7f7fff446c90, opts=0x0) at /usr/src/lib/librefuse/refuse_lowlevel.c:125
#1  0x000000000040628e in sqfs_usage (progname=0x7f7fff447470 "/usr/pkg/bin/squashfuse", fuse_usage=true) at fuseprivate.c:105
#2  0x00000000004018da in main (argc=2, argv=0x7f7fff446eb0) at hl.c:305

Browsing libfuse examples they confirm that the function prototype is different out there - with two arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions