[#25976] tnono dumps core — nobu@...

なかだです。

16 messages 2005/04/02
[#25977] Re: tnono dumps core — Masaki Suketa <masaki.suketa@...> 2005/04/03

助田です。

[#25998] ruby 1.8.3 preview予定 — Yukihiro Matsumoto <matz@...>

まつもと ゆきひろです

45 messages 2005/04/07
[#26011] bcc32、win32 での install-doc の動作 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/04/10

山本です。

[#26012] Re: bcc32、win32 での install-doc の動作 — nobu@... 2005/04/10

なかだです。

[#26013] Re: bcc32、win32 での install-doc の動作 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/04/11

山本です。

[#26014] Re: bcc32、win32 での install-doc の動作 — "U.Nakamura" <usa@...> 2005/04/11

こんにちは、なかむら(う)です。

[#26034] Re: bcc32、win32 での install-doc の動作 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/04/12

山本です。

[#26035] Re: bcc32、win32 での install-doc の動作 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/04/12

山本です。

[#26036] Re: bcc32、win32 での install-doc の動作 — "U.Nakamura" <usa@...> 2005/04/12

こんにちは、なかむら(う)です。

[#26040] Re: bcc32、win32 での install-doc の動作 — nobu@... 2005/04/13

なかだです。

[#26041] Re: bcc32、win32 での install-doc の動作 — "U.Nakamura" <usa@...> 2005/04/13

こんにちは、なかむら(う)です。

[#26042] Re: bcc32、win32 での install-doc の動作 — nobu@... 2005/04/13

なかだです。

[#26043] Re: bcc32、win32 での install-doc の動作 — "U.Nakamura" <usa@...> 2005/04/13

こんにちは、なかむら(う)です。

[#26045] Re: bcc32、win32 での install-doc の動作 — nobu@... 2005/04/13

なかだです。

[#26049] Re: bcc32、win32 での install-doc の動作 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/04/14

山本です。

[#26051] Re: bcc32、win32 での install-doc の動作 — nobu@... 2005/04/14

なかだです。

[#26059] Re: bcc32、win32 での install-doc の動作 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/04/14

山本です。

[#26060] Re: bcc32、win32 での install-doc の動作 — nobu@... 2005/04/15

なかだです。

[#26100] FileUtils.rm_rf security problem — Tanaka Akira <akr@...17n.org>

ふと、CVE で perl 関係のを見ていたら、File::Path の rmtree に関するも

21 messages 2005/04/26
[#26102] Re: FileUtils.rm_rf security problem — Tanaka Akira <akr@...17n.org> 2005/04/26

[#26190] Re: FileUtils.rm_rf security problem — Minero Aoki <aamine@...> 2005/05/20

青木です。

[#26191] Re: FileUtils.rm_rf security problem — Tanaka Akira <akr@...17n.org> 2005/05/20

In article <20050520171837N.aamine@loveruby.net>,

[#26192] Re: FileUtils.rm_rf security problem — Minero Aoki <aamine@...> 2005/05/20

青木です。

[#26197] Re: FileUtils.rm_rf security problem — Minero Aoki <aamine@...> 2005/05/21

青木です。

[ruby-dev:26062] `_Unwind_Context' undeclared

From: akira yamada <akira@...>
Date: 2005-04-15 01:03:26 UTC
List: ruby-dev #26062
akira yamada / やまだあきら wrote:
> 現時点でのHEADをLinux/ia64環境でmakeすると以下のエラーが出ます。
> 
> gcc -g -O2   -I. -I.  -c eval.c
> eval.c: In function `rb_thread_save_context':
> eval.c:9838: error: `_Unwind_Context' undeclared (first use in this
> function)
> eval.c:9838: error: (Each undeclared identifier is reported only once
> eval.c:9838: error: for each function it appears in.)
> eval.c:9838: error: `unwctx' undeclared (first use in this function)
> eval.c:9841: error: `_UNW_AR_BSP' undeclared (first use in this
> function)
> eval.c:9842: error: `_UNW_AR_BSPSTORE' undeclared (first use in this
> function)
> eval.c: In function `rb_thread_restore_context':
> eval.c:9999: error: `_Unwind_Context' undeclared (first use in this
> function)
> eval.c:9999: error: `unwctx' undeclared (first use in this function)
> eval.c:10002: error: `_UNW_AR_BSP' undeclared (first use in this
> function)

この問題についてlibunwindのインタフェースを
使うようにすると回避できそうな感じです。

configureのこととか考えてないパッチですが
以下のような変更を加えて、かつ、
-lunwindを-lunwind-ia64に変更することで
make、make testまでできることを確認できました。
# gcc version 3.3.5 (Debian 1:3.3.5-12) です。

ただしmake test-allはSEGVします。
また、変更部分はlibunwind(3)のmanのサンプルコードを
見ながら適当にいじっただけですので
あてにならないかもしれません。
# 単にbuildできたというだけかも……(^_^;)。

Index: eval.c
===================================================================
RCS file: /src/ruby/eval.c,v
retrieving revision 1.770
diff -u -r1.770 eval.c
--- eval.c	7 Apr 2005 08:38:03 -0000	1.770
+++ eval.c	15 Apr 2005 00:40:11 -0000
@@ -9643,7 +9643,7 @@
 #define __libc_ia64_register_backing_store_base (4ULL<<61)
 #else
 #ifdef HAVE_UNWIND_H
-#include <unwind.h>
+#include <libunwind.h>
 #else
 #pragma weak __libc_ia64_register_backing_store_base
 extern unsigned long __libc_ia64_register_backing_store_base;
@@ -10132,12 +10132,13 @@
     {
 	VALUE *top, *bot;
 #ifdef HAVE_UNWIND_H
-	_Unwind_Context *unwctx = _UNW_createContextForSelf();
+	unw_cursor_t unwcsr;
+	unw_context_t unwctx;

-	_UNW_currentContext(unwctx);
-	bot = (VALUE*)(long)_UNW_getAR(unwctx, _UNW_AR_BSP);
-	top = (VALUE*)(long)_UNW_getAR(unwctx, _UNW_AR_BSPSTORE);
-	_UNW_destroyContext(unwctx);
+	unw_getcontext(&unwctx);
+	unw_init_local(&unwcsr, &unwctx);
+	unw_get_reg(&unwcsr, UNW_IA64_AR_BSP, (unw_word_t *)&bot);
+	unw_get_reg(&unwcsr, UNW_IA64_AR_BSPSTORE, (unw_word_t *)&top);
 #else
 	ucontext_t ctx;

@@ -10294,11 +10295,12 @@
     {
 	VALUE *base;
 #ifdef HAVE_UNWIND_H
-	_Unwind_Context *unwctx = _UNW_createContextForSelf();
+	unw_cursor_t unwcsr;
+	unw_context_t unwctx;

-	_UNW_currentContext(unwctx);
-	base = (VALUE*)(long)_UNW_getAR(unwctx, _UNW_AR_BSP);
-	_UNW_destroyContext(unwctx);
+	unw_getcontext(&unwctx);
+	unw_init_local(&unwcsr, &unwctx);
+	unw_get_reg(&unwcsr, UNW_IA64_AR_BSP, (unw_word_t *)&base);
 #else
 	base = (VALUE*)__libc_ia64_register_backing_store_base;
 #endif
Index: gc.c
===================================================================
RCS file: /src/ruby/gc.c,v
retrieving revision 1.197
diff -u -r1.197 gc.c
--- gc.c	4 Mar 2005 06:47:43 -0000	1.197
+++ gc.c	15 Apr 2005 00:40:11 -0000
@@ -40,7 +40,7 @@
 #define __libc_ia64_register_backing_store_base (4ULL<<61)
 #else
 #ifdef HAVE_UNWIND_H
-#include <unwind.h>
+#include <libunwind.h>
 #else
 #pragma weak __libc_ia64_register_backing_store_base
 extern unsigned long __libc_ia64_register_backing_store_base;
@@ -1351,17 +1351,18 @@
 	ucontext_t ctx;
 	VALUE *top, *bot;
 #ifdef HAVE_UNWIND_H
-	_Unwind_Context *unwctx = _UNW_createContextForSelf();
+	unw_cursor_t unwcsr;
+	unw_context_t unwctx;
 #endif

 	getcontext(&ctx);
 	mark_locations_array((VALUE*)&ctx.uc_mcontext,
 			     ((size_t)(sizeof(VALUE)-1 + sizeof ctx.uc_mcontext)/sizeof(VALUE)));
 #ifdef HAVE_UNWIND_H
-	_UNW_currentContext(unwctx);
-	bot = (VALUE*)(long)_UNW_getAR(unwctx, _UNW_AR_BSP);
-	top = (VALUE*)(long)_UNW_getAR(unwctx, _UNW_AR_BSPSTORE);
-	_UNW_destroyContext(unwctx);
+	unw_getcontext(&unwctx);
+	unw_init_local(&unwcsr, &unwctx);
+	unw_get_reg(&unwcsr, UNW_IA64_AR_BSP, (unw_word_t *)&bot);
+	unw_get_reg(&unwcsr, UNW_IA64_AR_BSPSTORE, (unw_word_t *)&top);
 #else
 	bot = (VALUE*)__libc_ia64_register_backing_store_base;
 	top = (VALUE*)ctx.uc_mcontext.IA64_BSPSTORE;



-- 
やまだあきら / akira yamada  <http://arika.org>

In This Thread