hossbeast / fab

build optimally
GNU General Public License v3.0
4 stars 0 forks source link

fab seg faults when no current directory #45

Closed geo98003 closed 4 years ago

geo98003 commented 10 years ago

If the current directory is deleted and then fab is executed it seg faults. Here is the trace:

Starting program: /usr/local/bin/fab 
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
process 10909 is executing new program: /usr/local/bin/fab
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
__strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:31
31  ../sysdeps/x86_64/multiarch/../strlen.S: No such file or directory.
(gdb) bt
#0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:31
#1  0x00007f1f4c2fac56 in __GI___strdup (s=0x0) at strdup.c:41
#2  0x000000000040a985 in create.part.1 ()
#3  0x000000000040b2b8 in path_create_init ()
#4  0x000000000042a374 in args_parse ()
#5  0x000000000040697f in main ()
hossbeast commented 4 years ago

Brian, thanks for the bug report!

In the latest version of fab, I can report that in this case you get an error message instead of a crash

todd@euclid ~/fab/goats
1 % fab
   ERROR           fab[97704]/[97704] [KERNEL:ENOENT] No such file or directory with path . name fab pgid 97704 pid 97704 and tid 97704
  3 : in xrealpaths at xstdlib.c:218
  2 : in fab_client_create at client.c:152
  1 : in xmain at main.c:82
  0 : in xmain_jump at main.c:144
fatal: Unable to read current working directory: No such file or directory

So, closing this as fixed =)