[#32945] Shift_JIS variants and UTF-16 support — "U.Nakamura" <usa@...>

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

22 messages 2008/01/07
[#32953] Re: Shift_JIS variants and UTF-16 support — Martin Duerst <duerst@...> 2008/01/07

中村さん、こんにちは。

[#32955] Re: Shift_JIS variants and UTF-16 support — Yukihiro Matsumoto <matz@...> 2008/01/07

まつもと ゆきひろです

[#32959] Re: Shift_JIS variants and UTF-16 support — "NARUSE, Yui" <naruse@...> 2008/01/07

成瀬です。

[#32960] Re: Shift_JIS variants and UTF-16 support — Yukihiro Matsumoto <matz@...> 2008/01/07

まつもと ゆきひろです

[#32992] ASCII is alias of US-ASCII; replica of dummy encoding is not a dummy — "NARUSE, Yui" <naruse@...>

成瀬です。

18 messages 2008/01/08
[#32994] Re: ASCII is alias of US-ASCII; replica of dummy encoding is not a dummy — Yukihiro Matsumoto <matz@...> 2008/01/09

まつもと ゆきひろです

[#32995] Re: ASCII is alias of US-ASCII; replica of dummy encoding is not a dummy — Martin Duerst <duerst@...> 2008/01/09

At 18:13 08/01/09, Yukihiro Matsumoto wrote:

[#33011] Re: ASCII is alias of US-ASCII; replica of dummy encoding is not a dummy — "NARUSE, Yui" <naruse@...> 2008/01/11

成瀬です。

[#33012] Re: ASCII is alias of US-ASCII; replica of dummy encoding is not a dummy — Yukihiro Matsumoto <matz@...> 2008/01/11

まつもと ゆきひろです

[#33014] Re: ASCII is alias of US-ASCII; replica of dummy encoding is not a dummy — "NARUSE, Yui" <naruse@...> 2008/01/11

成瀬です。

[#33015] Re: ASCII is alias of US-ASCII; replica of dummy encoding is not a dummy — Yukihiro Matsumoto <matz@...> 2008/01/11

まつもと ゆきひろです

[#33239] Re: [ruby-cvs:22386] Ruby:r15149 (trunk): * string.c (rb_str_each_char): move forward. — Tanaka Akira <akr@...>

In article <200801210259.m0L2x3CW017171@ci.ruby-lang.org>,

11 messages 2008/01/21
[#33240] Re: [ruby-cvs:22386] Ruby:r15149 (trunk): * string.c (rb_str_each_char): move forward. — Nobuyoshi Nakada <nobu@...> 2008/01/21

なかだです。

[#33303] Time#strftimeのエンコーディング — rubikitch@...

るびきちです。

13 messages 2008/01/23
[#33305] Re: Time#strftimeのエンコーディング — Yukihiro Matsumoto <matz@...> 2008/01/23

まつもと ゆきひろです

[#33368] summary of script encoding — "U.Nakamura" <usa@...>

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

22 messages 2008/01/25
[#33375] Re: summary of script encoding — Yukihiro Matsumoto <matz@...> 2008/01/25

まつもと ゆきひろです

[#33376] Re: summary of script encoding — "U.Nakamura" <usa@...> 2008/01/25

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

[#33387] HashからStructを作る — rubikitch@...

るびきちです。

19 messages 2008/01/25
[#33455] Re: HashからStructを作る — Yukihiro Matsumoto <matz@...> 2008/01/28

まつもと ゆきひろです

[#33505] Re: HashからStructを作る — rubikitch@... 2008/01/29

From: Yukihiro Matsumoto <matz@ruby-lang.org>

[#33507] Re: HashからStructを作る — Yukihiro Matsumoto <matz@...> 2008/01/29

まつもと ゆきひろです

[#33508] Re: HashからStructを作る — rubikitch@... 2008/01/29

From: Yukihiro Matsumoto <matz@ruby-lang.org>

[#33433] Win32OLE: set encoding to OLE string — "U.Nakamura" <usa@...>

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

16 messages 2008/01/28

[#33461] Failed to make ruby-1.8.6-p111 on MacOSX 10.5(Leopard) — MORITA Hideyuki <h-morita@...>

=1B$B?9ED$H?=3D$7$^$9!#=1B(B

19 messages 2008/01/28
[#33473] Re: Failed to make ruby-1.8.6-p111 on MacOSX 10.5(Leopard) — Nobuyoshi Nakada <nobu@...> 2008/01/28

なかだです。

[#33503] Re: Failed to make ruby-1.8.6-p111 on MacOSX 10.5(Leopard) — MORITA Hideyuki <h-morita@...> 2008/01/29

森田です。

[#33514] Re: Failed to make ruby-1.8.6-p111 on MacOSX 10.5(Leopard) — Nobuyoshi Nakada <nobu@...> 2008/01/29

なかだです。

[#33518] Re: Failed to make ruby-1.8.6-p111 on MacOSX 10.5(Leopard) — MORITA Hideyuki <h-morita@...> 2008/01/30

森田です。

[#33545] Re: Failed to make ruby-1.8.6-p111 on MacOSX 10.5(Leopard) — Ryutaro Amano <wn9r-amn@...> 2008/01/31

天野竜太郎と申します。

[#33546] Re: Failed to make ruby-1.8.6-p111 on MacOSX 10.5(Leopard) — MORITA Hideyuki <h-morita@...> 2008/01/31

森田です。

[#33547] Re: Failed to make ruby-1.8.6-p111 on MacOSX 10.5(Leopard) — Ryutaro Amano <wn9r-amn@...> 2008/01/31

天野です。

[#33551] Re: Failed to make ruby-1.8.6-p111 on MacOSX 10.5(Leopard) — MORITA Hideyuki <h-morita@...> 2008/01/31

森田です。

[#33488] 現在の script encoding の値を得る方法は? — Hidetoshi NAGAI <nagai@...>

永井@知能.九工大です.

20 messages 2008/01/29
[#33491] Re: 現在の script encoding の値を得る方法は? — Yukihiro Matsumoto <matz@...> 2008/01/29

まつもと ゆきひろです

[#33500] Re: 現在の script encoding の値を得る方法は? — Hidetoshi NAGAI <nagai@...> 2008/01/29

永井@知能.九工大です.

[#33501] Re: 現在の script encoding の値を得る方法は? — "NARUSE, Yui" <naruse@...> 2008/01/29

成瀬です。

[#33515] Re: 現在の script encoding の値を得る方法は? — Hidetoshi NAGAI <nagai@...> 2008/01/30

永井@知能.九工大です.

[#33516] Re: 現在の script encoding の値を得る方法は? — "NARUSE, Yui" <naruse@...> 2008/01/30

成瀬です。

[#33519] Re: 現在の script encoding の値を得る方法は? — Hidetoshi NAGAI <nagai@...> 2008/01/30

永井@知能.九工大です.

[#33522] Re: 現在の script encoding の値を得る方法は? — "NARUSE, Yui" <naruse@...> 2008/01/30

成瀬です。

[ruby-dev:32970] rb_thread_create()の中でmodule_eval

From: Kouhei Sutou <kou@...>
Date: 2008-01-07 13:02:21 UTC
List: ruby-dev #32970
須藤です。

以下の拡張ライブラリが落ちるのですが、そういうものでしょうか?
ちなみにmodule_evalをpにすると落ちません。

Ruby/GLibというもう少し大きなライブラリの中での話だと
module_evalのままでもrb_str_new2("")だと落ちて、
rb_str_new2("def ...")だと落ちませんでした。
でも、↓だと""でもそうでなくても落ちます。

a.c:
  #include <ruby.h>

  static VALUE
  eval(void *string)
  {
      rb_funcall(rb_cObject, rb_intern("module_eval"), 1,
                 rb_str_new2(string ? string : "p 1"));
  }

  void
  Init_a(void)
  {
      eval("p 100");
      rb_thread_create(eval, NULL);
      eval("p 123");
  }

extconf.rb:
  require 'mkmf'

  create_makefile("a")


コマンドライン:
  % /tmp/local/bin/ruby extconf.rb
  creating Makefile
  % make
  gcc -I. -I/tmp/local/include/ruby-1.9.0/x86_64-linux -I/tmp/local/include/ruby-1.9.0 -I.   -fPIC -g   -o a.o -c a.c
  gcc -shared -o a.so a.o -L. -L/tmp/local/lib -Wl,-R/tmp/local/lib -L.  -rdynamic -Wl,-export-dynamic    -lpthread -lrt -ldl -lcrypt -lm   -lc
  % /tmp/local/bin/ruby -e 'require "a"; sleep 1'
  100
  123
  [BUG] Segmentation fault
  ruby 1.9.0 (2008-01-07 revision 0) [x86_64-linux]

  -- control frame ----------
  c:0002 p:---- s:0004 b:0004 l:000003 d:000003 CFUNC  :module_eval
  c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP    
  ---------------------------
  -- backtrace of native function call (Use addr2line) --
  0x4d79ee
  0x4fbc9a
  0x4fbd8a
  0x494b7d
  0x2b579912e7d0
  0x41cf53
  0x41d1b2
  0x41d316
  0x41d409
  0x4cc20c
  0x4cbc98
  0x41c120
  0x41c194
  0x41c56b
  0x2aaaaaab2744
  0x4d89eb
  0x4d7dbe
  0x2b57991263f7
  0x2b5799cd991d
  -------------------------------------------------------
  zsh: abort      /tmp/local/bin/ruby -e 'require "a"; sleep 1'
  % gdb --args /tmp/local/bin/ruby -e 'require "a"; sleep 1'
  GNU gdb 6.7.1-debian
  Copyright (C) 2007 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 "x86_64-linux-gnu"...
  Using host libthread_db library "/lib/libthread_db.so.1".
  (gdb) r
  Starting program: /tmp/local/bin/ruby -e require\ \"a\"\;\ sleep\ 1
  [Thread debugging using libthread_db enabled]
  [New Thread 0x2ab6615f7dc0 (LWP 21874)]
  [New Thread 0x40003950 (LWP 21881)]
  100
  [New Thread 0x40084950 (LWP 21882)]
  123

  Program received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 0x40084950 (LWP 21882)]
  0x000000000041cf53 in exec_under (func=0x41d0e5 <eval_under_i>, 
      under=46962807518120, self=46962807518120, args=1074281200) at eval.c:1856
  1856	    while (!RUBY_VM_NORMAL_ISEQ_P(cfp->iseq)) {
  (gdb) bt
  #0  0x000000000041cf53 in exec_under (func=0x41d0e5 <eval_under_i>, 
      under=46962807518120, self=46962807518120, args=1074281200) at eval.c:1856
  #1  0x000000000041d1b2 in eval_under (under=46962807518120, 
      self=46962807518120, src=46962807166400, file=0x519bb1 "(eval)", line=1)
      at eval.c:1920
  #2  0x000000000041d316 in specific_eval (argc=1, argv=0x40083e60, 
      klass=46962807518120, self=46962807518120) at eval.c:1959
  #3  0x000000000041d409 in rb_mod_module_eval (argc=1, argv=0x40083e60, 
      mod=46962807518120) at eval.c:2059
  #4  0x00000000004cc20c in call_cfunc (func=0x41d3e2 <rb_mod_module_eval>, 
      recv=46962807518120, len=-1, argc=1, argv=0x40083e60)
      at vm_insnhelper.c:280
  #5  0x00000000004cbc98 in vm_call0 (th=0x85f040, klass=46962807518040, 
      recv=46962807518120, id=2976, oid=0, argc=1, argv=0x40083e60, 
      body=0x2ab66174c768, nosuper=0) at vm.c:457
  #6  0x000000000041c120 in rb_call0 (klass=46962807518040, recv=46962807518120, 
      mid=2976, argc=1, argv=0x40083e60, scope=3, self=4) at eval.c:1438
  #7  0x000000000041c194 in rb_call (klass=46962807517800, recv=46962807518120, 
      mid=2976, argc=1, argv=0x40083e60, scope=3) at eval.c:1452
  #8  0x000000000041c56b in rb_funcall (recv=46962807518120, mid=2976, n=1)
      at eval.c:1544
  #9  0x00002aaaaaab2744 in eval (string=0x0) at a.c:6
  #10 0x00000000004d89eb in thread_start_func_2 (th=0x85f040, 
      stack_start=0x40084130) at thread.c:316
  #11 0x00000000004d7dbe in thread_start_func_1 (th_ptr=0x85f040)
      at thread_pthread.c:175
  #12 0x00002ab6607bd3f7 in start_thread () from /lib/libpthread.so.0
  #13 0x00002ab66137091d in clone () from /lib/libc.so.6
  #14 0x0000000000000000 in ?? ()
  (gdb) quit
  The program is running.  Exit anyway? (y or n) y
  %

In This Thread

Prev Next