[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FDclone-users:00941] ツリーで移動中にSEGV



小松です。

表題の件ですが、再現手順を説明します。
まず、ルートディレクトリに移動し、ツリー表示状態にします。

FD(File & Directory tool) Ver.3.00j (c)1995-2010 T.Shirai 12-02-26 19:21
  Page: 1/ 1 Mark:   0/  19 Sort:名前順(昇り順) Find:
  Path:/
  Tree=/
  /                                              | [No Files]
  +--bin>                                        |
  +--boot>                                       |
  +--dev>                                        |
  +--etc>                                        |
  +--home>                                       |
  +--lib>                                        |
  +--lost+found                                  |
  +--media                                       |
  +--mnt>                                        |
  +--opt>                                        |
  +--proc>                                       |
  +--root                                        |
  +--sbin>                                       |
  +--sys>                                        |
  +--tmp>                                        |
  +--usr>                                        |

H Logdir eXec Copy Delete Rename Sort Find Tree Editor Unpack

この状態で、PageDownを押すと、ツリーが消えます。

FD(File & Directory tool) Ver.3.00j (c)1995-2010 T.Shirai 12-02-26 19:23
  Page: 1/ 1 Mark:   0/  19 Sort:名前順(昇り順) Find:
  Path:/
  Tree=/usr
                                                 | .keep
                                                 |
                                                 |
                                                 |
                                                 |
                                                 |
                                                 |
                                                 |
                                                 |
                                                 |
                                                 |
                                                 |
                                                 |
                                                 |
                                                 |
                                                 |
                                                 |

H Logdir eXec Copy Delete Rename Sort Find Tree Editor Unpack

この時に、Backspaceで、SEGV。

GDB上ではこうなっています。

(gdb) attach 24479
Attaching to program: /home/hironao/FD-3.00j/fd, process 24479
Reading symbols from /lib/libncurses.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libc.so.6...Reading symbols from /usr/lib/debug/lib/libc-2.13.so.debug...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...Reading symbols from /usr/lib/debug/lib/ld-2.13.so.debug...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_compat.so.2...Reading symbols from /usr/lib/debug/lib/libnss_compat-2.13.so.debug...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnsl.so.1...Reading symbols from /usr/lib/debug/lib/libnsl-2.13.so.debug...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libnss_nis.so.2...Reading symbols from /usr/lib/debug/lib/libnss_nis-2.13.so.debug...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib/libnss_files.so.2...Reading symbols from /usr/lib/debug/lib/libnss_files-2.13.so.debug...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib/libnss_files.so.2
0xffffe424 in __kernel_vsyscall ()
(gdb) break tree.c:583
Breakpoint 1 at 0x80b01b9: file tree.c, line 583.
(gdb) c
Continuing.

Breakpoint 1, _tree () at tree.c:803
(gdb) watch tr_cur
Hardware watchpoint 2: tr_cur
(gdb) clear 583
Deleted breakpoint 1
(gdb) c
Continuing.
Hardware watchpoint 2: tr_cur

Old value = (treelist *) 0x8b62c60
New value = (treelist *) 0x8b67d80
searchtree () at tree.c:408
(gdb) c
Continuing.
Hardware watchpoint 2: tr_cur

Old value = (treelist *) 0x8b67d80
New value = (treelist *) 0x0
searchtree () at tree.c:408
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x080b075e in _tree_input () at tree.c:679
(gdb) bt
#0  0x080b075e in _tree_input () at tree.c:679
#1  _tree () at tree.c:803
#2  0x080b0b61 in tree (cleanup=0, drvp=0x0) at tree.c:851
#3  0x080c3c17 in tree_dir (arg=0x0) at command.c:1866
#4 0x080ca998 in browsedir (def=0xbfd4b2c0 "..", file=0xbfd4b3c0 ".") at browse.c:1770
#5  main_fd (pathlist=0xbfd4c5c8, internal=0) at browse.c:2042
#6 0x0804bf26 in main (argc=<optimized out>, argv=0xbfd4c5c4, envp=0xbfd4c5cc) at main.c:1586
(gdb) l
674				}
675	/*FALLTHRU*/
676			case K_BS:
677				do {
678					if (treeup() < 0) break;
679				} while (&(tr_cur -> sub[tr_no]) != old);
680				break;
681			case 'l':
682				if (!(cwd = inputstr(LOGD_K, 0, -1, NULL, HST_PATH))
683				|| !*(cwd = evalpath(cwd, 0)))
(gdb) p tr_cur
$1 = (treelist *) 0x0
(gdb)



--
Hironao Komatsu <hirkmt@gmail.com>