(toppers-users 4039) jsp 1.4.3でアボートします

野田敬雄 takaon90 @ gmail.com
2012年 11月 8日 (木) 16:17:03 JST


はじめまして、野田と申します。

会社の研修で、ITRONのプログラムを作成しろという課題を与えられていろいろ頑張っているんですが、
完全な実力不足で環境さえ作成できないため、申し訳ありませんがアドバイスをお願いします。

jsp-1.4.3のlinuxシミュレータでサンプルアプリのコンパイルが通るところまでは行ったんですが、
実行してすぐにアボートしてしまいます。

gdbもろくに使えないレベルなので解釈が全く違っているかもしれませんが、
なんとなく実行結果を見た限りでは、無限ループに入ってメモリを食いつぶした、
という感じかな、と思っています。

こういった状況の場合、原因としてどんなことが考えられるでしょうか?
よろしくお願いします。

以下に環境と実行結果のログを貼り付けます。

ハード(?):
WindowsXP+VMwarePlayer2.5.5
OS: Ubuntu10.04(8.04LTSからアップグレード)

ソフト:
gcc              4:4.4.3-1ubuntu1
gcc-4.4       4.4.3-4ubuntu5.1
g++             4:4.4.3-1ubuntu1
g++4.4        4.4.3-4ubuntu5.1
binutils       2.20.1-3ubuntu7.1
libnewlib0  1.18.0-1ubuntu2


-----------------実行結果---------------------------------------
noda @ ubuntu-vm:~/work/jsp/APL$ ./jsp

TOPPERS/JSP Kernel Release 1.4 (patchlevel = 3) for Linux(posix-base)
(Nov  7 2012, 16:56:27)
Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
                            Toyohashi Univ. of Technology, JAPAN
Copyright (C) 2004-2006 by Embedded and Real-Time Systems Laboratory
            Graduate School of Information Science, Nagoya Univ., JAPAN

*** longjmp causes uninitialized stack frame ***: ./jsp terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x50)[0xd04d10]
/lib/tls/i686/cmov/libc.so.6(+0xe7c7a)[0xd04c7a]
./jsp[0x804b0fe]
./jsp[0x804c419]
./jsp[0x804a55d]
./jsp[0x804b1a7]
./jsp[0x804b12f]
./jsp[0x804b12f]
./jsp[0x804b12f]
(同じ内容なので中略)
./jsp[0x804b12f]
./jsp[0x804b12f]
./jsp[0x804b12f]
./jsp[0x804b12f]
./jsp[0x804b12f]
======= Memory map: ========
00368000-00383000 r-xp 00000000 08:01 699211     /lib/ld-2.11.1.so
00383000-00384000 r--p 0001a000 08:01 699211     /lib/ld-2.11.1.so
00384000-00385000 rw-p 0001b000 08:01 699211     /lib/ld-2.11.1.so
006b0000-006b1000 r-xp 00000000 00:00 0          [vdso]
0079b000-007b8000 r-xp 00000000 08:01 696461     /lib/libgcc_s.so.1
007b8000-007b9000 r--p 0001c000 08:01 696461     /lib/libgcc_s.so.1
007b9000-007ba000 rw-p 0001d000 08:01 696461     /lib/libgcc_s.so.1
00c1d000-00d76000 r-xp 00000000 08:01 712828
/lib/tls/i686/cmov/libc-2.11.1.so
00d76000-00d78000 r--p 00159000 08:01 712828
/lib/tls/i686/cmov/libc-2.11.1.so
00d78000-00d79000 rw-p 0015b000 08:01 712828
/lib/tls/i686/cmov/libc-2.11.1.so
00d79000-00d7c000 rw-p 00000000 00:00 0
08048000-08050000 r-xp 00000000 08:01 771894     /home/noda/work/jsp/APL/jsp
08050000-08051000 r--p 00007000 08:01 771894     /home/noda/work/jsp/APL/jsp
08051000-08052000 rw-p 00008000 08:01 771894     /home/noda/work/jsp/APL/jsp
08052000-0805e000 rw-p 00000000 00:00 0
099a8000-099c9000 rw-p 00000000 00:00 0          [heap]
b77d8000-b77d9000 rw-p 00000000 00:00 0
b77e9000-b77ec000 rw-p 00000000 00:00 0
bfd34000-bfdae000 rw-p 00000000 00:00 0          [stack]
アボートしました
noda @ ubuntu-vm:~/work/jsp/APL$


-----------------gdbで実行した結果---------------------------------------
noda @ ubuntu-vm:~/work/jsp/APL$
noda @ ubuntu-vm:~/work/jsp/APL$ gdb ./jsp
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 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 "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/noda/work/jsp/APL/jsp...done.
(gdb) run
Starting program: /home/noda/work/jsp/APL/jsp

Program received signal SIGUSR1, User defined signal 1.
0x0012d422 in __kernel_vsyscall ()
(gdb) s
Single stepping until exit from function __kernel_vsyscall,
which has no line number information.
kernel_start () at ../kernel/startup.c:57
57	{
(gdb) s
61		cpu_initialize();
(gdb) s

Program received signal SIGTRAP, Trace/breakpoint trap.
0x0804b011 in _kernel_cpu_initialize () at ../config/linux/cpu_config.c:135
135	{
(gdb) s
161	            sigfillset(&dis_action.sa_mask);
(gdb)
159	            dis_action.sa_handler = dispatch;
(gdb) s
160	            dis_action.sa_flags   =  0;
(gdb) s
161	            sigfillset(&dis_action.sa_mask);
(gdb) s

Program received signal SIGTRAP, Trace/breakpoint trap.
0x001590f1 in sigfillset () from /lib/tls/i686/cmov/libc.so.6
(gdb) s
Single stepping until exit from function sigfillset,
which has no line number information.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00144a12 in ?? () from /lib/tls/i686/cmov/libc.so.6
(gdb) s
Cannot find bounds of current function
(gdb) s
Cannot find bounds of current function
(gdb) s
Cannot find bounds of current function
(gdb) s
Cannot find bounds of current function
(gdb) s
Cannot find bounds of current function
(gdb) s
Cannot find bounds of current function
(gdb)

noda @ ubuntu-vm:~/work/jsp/APL$
noda @ ubuntu-vm:~/work/jsp/APL$ readelf -s
/lib/tls/i686/cmov/libc.so.6|grep sigfillset
   451: 0002b0f0    92 FUNC    GLOBAL DEFAULT   12 sigfillset@@GLIBC_2.0
noda @ ubuntu-vm:~/work/jsp/APL$