hns - 日記自動生成システム - Version 2.19.9

先月 2004年07月 来月
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2004年07月08日(木) 旧暦 [n年日記]

#1 [Emacs] temacs Segmentation Faults

cvs as of 2004-07-07
[makoto@fedora src] $ gdb ./temacs
GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

DISPLAY = :0.0
TERM = xterm
Breakpoint 1 at 0x80dfe0e: file emacs.c, line 428.
Breakpoint 2 at 0x80c3644: file xterm.c, line 7837.
(gdb) set args --batch --load loadup bootstrap
(gdb) run
Starting program: /usr/home/makoto/local-src/emacs/src/temacs --batch --load loadup bootstrap
Loading loadup.el (source)...
....
....
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under names emacs and emacs-21.3.50

Program received signal SIGSEGV, Segmentation fault.
0x0085bedc in memcpy () from /lib/tls/libc.so.6
(gdb) where
#0 0x0085bedc in memcpy () from /lib/tls/libc.so.6
#1 0x0816613e in unexec (new_name=0xa775f50 "/home/makoto/local-src/emacs/src/emacs",
old_name=0xa775f7c "/home/makoto/local-src/emacs/src/temacs", data_start=137920040, bss_start=0,
entry_address=0) at unexelf.c:925
#2 0x080e1779 in Fdump_emacs (filename=175782384, symfile=175782368) at emacs.c:2179
#3 0x0813edfc in Feval (form=135914504) at eval.c:2080
#4 0x0813c7df in Fprogn (args=-1095667228) at eval.c:408
#5 0x0813c71d in Fif (args=171318653) at eval.c:357
#6 0x0813ef45 in Feval (form=137912276) at eval.c:2027
#7 0x0813c6fc in Fif (args=171320253) at eval.c:356
#8 0x0813ef45 in Feval (form=137912276) at eval.c:2027
#9 0x081530b3 in readevalloop (readcharfun=170033289, stream=0xa24d410, sourcename=170184363,
evalfun=0x813eac8 <Feval>, printflag=0, unibyte=169953377, readfun=169953377) at lread.c:1376
#10 0x081520ff in Fload (file=170184363, noerror=169953377, nomessage=169953377, nosuffix=137925152,
must_suffix=21244172) at lread.c:914
#11 0x0813ee3e in Feval (form=137916552) at eval.c:2094
#12 0x080e2675 in top_level_2 () at keyboard.c:1287
#13 0x0813dc9a in internal_condition_case (bfun=0x80e2664 <top_level_2>, handlers=170014305,
hfun=0x80e2338 <cmd_error>) at eval.c:1335
#14 0x080e26a9 in top_level_1 () at keyboard.c:1295
#15 0x0813d829 in internal_catch (tag=137925152, func=0x80e2678 <top_level_1>, arg=169953377)
at eval.c:1096
#16 0x080e25e3 in command_loop () at keyboard.c:1252
#17 0x080e2104 in recursive_edit_1 () at keyboard.c:963
#18 0x080e2224 in Frecursive_edit () at keyboard.c:1024
#19 0x080e0b7e in main (argc=5, argv=0xbfe80104) at emacs.c:1687
(gdb)

[makoto@fedora makoto]$
cvs update -dP -D 2003-12-31 gave me the same result,

cvs update -dP -D 2003-06-01:

while building Emacs; they do not indicate a problem.
((85057 . 21159) (5096 . 22) (543 . 120) 315395 26989 (10 . 1) (17 . 0) (6418 . 890))
Loading loaddefs.el (source)...
Symbol's function definition is void: autoload-coding-system
make[1]: *** [bootstrap-emacs] Error 255
make[1]: Leaving directory `/usr/home/makoto/local-src/emacs/src'
make: *** [bootstrap] Error 2
[makoto@fedora emacs]$
emacs-bidi ?
910  if (n == new_data2_index)
911	{
912	  /* Steal the data section header for this data2 section. */
913	  memcpy (&NEW_SECTION_H (nn), &OLD_SECTION_H (old_data_index),
914		  new_file_h->e_shentsize);
915
916	  NEW_SECTION_H (nn).sh_addr = new_data2_addr;
917	  NEW_SECTION_H (nn).sh_offset = new_data2_offset;
918	  NEW_SECTION_H (nn).sh_size = new_data2_size;
919	  /* Use the bss section's alignment. This will assure that the
920	     new data2 section always be placed in the same spot as the old
921	     bss section by any other application. */
922	  NEW_SECTION_H (nn).sh_addralign = OLD_SECTION_H (n).sh_addralign;
923
924	  /* Now copy over what we have in the memory now. */
925	  memcpy (NEW_SECTION_H (nn).sh_offset + new_base,
926		  (caddr_t) OLD_SECTION_H (n).sh_addr,
927		  new_data2_size);
#0 0x0085bedc in memcpy () from /lib/tls/libc.so.6
#1 0x0816613e in unexec (new_name=0x8a68198 "/home/makoto/local-src/emacs/src/emacs",
old_name=0x8a681c4 "/home/makoto/local-src/emacs/src/temacs", data_start=137920040, bss_start=0, entry_address=0)
at unexelf.c:925

(gdb) info line unexelf.c:925
Line 925 of "unexelf.c" starts at address 0x816610d <unexec+3417> and ends at 0x8166110 <unexec+3420>.
(gdb) disassemble 0x816610d 0x816615f
Dump of assembler code from 0x816610d to 0x816615f:
0x0816610d <unexec+3417>: add $0xc,%esp
0x08166110 <unexec+3420>: mov 0x20(%ecx,%ebx,1),%eax
0x08166114 <unexec+3424>: mov 0xffffff30(%ebp),%edi
0x0816611a <unexec+3430>: mov %eax,0x20(%edx,%esi,1)
0x0816611e <unexec+3434>: mov %edi,0xc(%edx,%esi,1)
0x08166122 <unexec+3438>: mov 0xffffff44(%ebp),%eax
0x08166128 <unexec+3444>: pushl 0xffffff2c(%ebp)
0x0816612e <unexec+3450>: pushl 0xc(%ecx,%ebx,1)
0x08166132 <unexec+3454>: add 0xffffff28(%ebp),%eax
0x08166138 <unexec+3460>: push %eax
0x08166139 <unexec+3461>: call 0x804f6ec
0x0816613e <unexec+3466>: incl 0xffffff20(%ebp)
0x08166144 <unexec+3472>: add $0x10,%esp
0x08166147 <unexec+3475>: jmp 0x81658fe <unexec+1354>
0x0816614c <unexec+3480>: push %edi
0x0816614d <unexec+3481>: push $0x0
0x0816614f <unexec+3483>: pushl 0xc(%ebp)
0x08166152 <unexec+3486>: push $0x8198583
0x08166157 <unexec+3491>: call 0x80aedf8 <fatal>
0x0816615c <unexec+3496>: mov 0xffffff48(%ebp),%ebx
End of assembler dump.
(gdb)
Seems not familiar, 'cause it's not PowerPC, but x86,

No symbol "new_data2_addr" in current context.:

When I did "print new_data2_addr", I got
No symbol "new_data2_addr" in current context.
(gdb)

with NetBSD/macppc, which runs temacs OK::

Breakpoint 6, unexec (new_name=0x1fede90 "/export/local-src/emacs/src/emacs",
old_name=0x1fedeb8 "/export/local-src/emacs/src/temacs", data_start=40,
bss_start=65522, entry_address=65521) at unexelf.c:925
(gdb)
Is there any relation to '-z nocombreloc' for ld ?

enable ifdef DEBUG part:

776c776
< #ifdef DEBUG
---
> #if 1 
(NetBSD/macppc)
Dumping under names emacs and emacs-21.3.50.3
old_bss_index 26
old_bss_addr 1b8d1a8
old_bss_size 3880d
new_bss_addr 1e89000
new_data2_addr 1b8d1a8
new_data2_size 2fbe58
new_data2_offset 37d1a8
989240 pure bytes used
(Fedora Core 1)
Dumping under names emacs and emacs-21.3.50
old_bss_index 20
old_bss_addr 8389220
old_bss_size 3edc8
new_bss_addr 9310000
new_data2_addr 8389220
new_data2_size f86de0
new_data2_offset 341220
make[1]: *** [bootstrap-emacs] Segmentation fault
NetBSD/macppc above, Fedora Core below:
 old_bss_index   old_bss_addr    old_bss_size new_bss_addr 
            26        1b8d1a8           3880d      1e89000
            20        8389220           3edc8      9310000

new_data2_addr new_data2_size new_data2_offset 
       1b8d1a8         2fbe58           37d1a8
       8389220         f86de0           341220
new_data2_size too big (251M ?)
new_data2_size = new_bss_addr - old_bsd_addr

or just a 16 Meg ?

just for a joke, >>3 code:

added for
new_data2_size = (new_bss_addr - old_bsd_addr) >> 3;

Continuing.
old_bss_addr 8389220
new_data2_addr 8389220
new_data2_size 3c4fbc
but no changes for the situation:
Program received signal SIGSEGV, Segmentation fault.
0x0085bedc in memcpy () from /lib/tls/libc.so.6
(gdb)
藤島さん より etc/PROBLEMS にあるやつ では ? .... 見ていませんでした。
当たり ! でした。ありがとうございます。
setarch i386 ./configure
setarch i386 make bootstrap



最近の日記
2024年03月10日
停電 (瞬電)
2024年03月03日
the second try on bare-metal
useradd
2024年02月29日
opendkim and senmail
2024年01月24日
chat/iam 0.0.8
2024年01月21日
uselocale vs setlocale (textproc/R-readxl)
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)