/* 140 kamil@rugged /tmp $ gcc test.c -lrump -lrumpdev -lrumpvfs -g -O0 141 kamil@rugged /tmp $ ./a.out [ 1.0000000] pool redzone disabled for 'kmem-4096' [ 1.0000090] pool redzone disabled for 'buf64k' Memory fault (core dumped) 142 kamil@rugged /tmp $ gdb ./a.out GNU gdb (GDB) 8.3 Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./a.out... (gdb) r Starting program: /tmp/a.out [ 1.0000000] pool redzone disabled for 'kmem-4096' [New LWP 2 of process 29960] [New LWP 3 of process 29960] [New LWP 4 of process 29960] [New LWP 5 of process 29960] [New LWP 6 of process 29960] [New LWP 7 of process 29960] [New LWP 8 of process 29960] [New LWP 9 of process 29960] [New LWP 10 of process 29960] [New LWP 11 of process 29960] [New LWP 12 of process 29960] [New LWP 13 of process 29960] [New LWP 14 of process 29960] [New LWP 15 of process 29960] [New LWP 16 of process 29960] [New LWP 17 of process 29960] [New LWP 18 of process 29960] [ 1.0000090] pool redzone disabled for 'buf64k' [New LWP 19 of process 29960] [New LWP 20 of process 29960] [New LWP 21 of process 29960] [New LWP 22 of process 29960] [New LWP 23 of process 29960] [New LWP 22 of process 29960] [New LWP 23 of process 29960] Thread 1 "" received signal SIGSEGV, Segmentation fault. pipe_ioctl (fp=, cmd=, data=0x7f7fffccd700) at /usr/src/lib/librump/../../sys/rump/../kern/sys_pipe.c:1108 warning: Source file is more recent than executable. 1108 *(int *)data = pipe->pipe_buffer.cnt; (gdb) bt #0 pipe_ioctl (fp=, cmd=, data=0x7f7fffccd700) at /usr/src/lib/librump/../../sys/rump/../kern/sys_pipe.c:1108 #1 0x000075b0de65083f in sys_ioctl (l=, uap=0x7f7fffccd820, retval=) at /usr/src/lib/librump/../../sys/rump/../kern/sys_generic.c:671 #2 0x000075b0de6b8957 in sy_call (rval=0x7f7fffccd810, uap=0x7f7fffccd820, l=0x75b0de126500, sy=) at /usr/src/lib/librump/../../sys/rump/../sys/syscallvar.h:65 #3 sy_invoke (code=54, rval=0x7f7fffccd810, uap=0x7f7fffccd820, l=0x75b0de126500, sy=) at /usr/src/lib/librump/../../sys/rump/../sys/syscallvar.h:94 #4 rump_syscall (num=num@entry=54, data=data@entry=0x7f7fffccd820, dlen=dlen@entry=24, retval=retval@entry=0x7f7fffccd810) at /usr/src/lib/librump/../../sys/rump/librump/rumpkern/rump.c:769 #5 0x000075b0de6ad2ca in rump___sysimpl_ioctl (fd=, com=, data=) at /usr/src/lib/librump/../../sys/rump/librump/rumpkern/rump_syscalls.c:979 #6 0x0000000000400bf7 in main (argc=1, argv=0x7f7fffccd8c8) at test.c:15 (gdb) q A debugging session is active. Inferior 1 [process 29960] will be killed. Quit anyway? (y or n) y [ 31253.9132631] sorry, pid 29960 was killed: orphaned traced process Killed 143 kamil@rugged /tmp $ cat test.c */ #include #include #include #include int main(int argc, char **argv) { int filedes[2]; rump_init(); rump_sys_pipe2(filedes, 0); rump_sys_dup2(filedes[1], filedes[0]); rump_sys_ioctl(filedes[1], FIONWRITE); }