[#54777] [ruby-trunk - Feature #8368][Open] Socket.getifaddrs — "akr (Akira Tanaka)" <akr@...>
6 messages
2013/05/04
[#54784] Call setlocale(LC_ALL, "") instead of setlocale(LC_CTYPE, "") — Nikolai Weibull <now@...>
Hi!
6 messages
2013/05/04
[#54786] Re: Call setlocale(LC_ALL, "") instead of setlocale(LC_CTYPE, "")
— Tanaka Akira <akr@...>
2013/05/04
2013/5/5 Nikolai Weibull <now@disu.se>:
[#54800] Re: Call setlocale(LC_ALL, "") instead of setlocale(LC_CTYPE, "")
— Nikolai Weibull <now@...>
2013/05/05
On Sun, May 5, 2013 at 12:56 AM, Tanaka Akira <akr@fsij.org> wrote:
[#54810] Re: Call setlocale(LC_ALL, "") instead of setlocale(LC_CTYPE, "")
— KOSAKI Motohiro <kosaki.motohiro@...>
2013/05/05
>> I think it is acceptable that make ruby more robust.
[#54850] [ruby-trunk - Feature #8377][Open] Deprecate :: for method calls in 2.1 — "charliesome (Charlie Somerville)" <charliesome@...>
27 messages
2013/05/07
[#54915] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1
— "jeremyevans0 (Jeremy Evans)" <merch-redmine@...>
2013/05/11
[#54924] Re: [ruby-changes:28599] hsbt:r40651 (trunk): fixed wrong document for Socket.tcp by @lann [fix GH-302] — Tanaka Akira <akr@...>
2013/5/12 hsbt <ko1@atdot.net>:
4 messages
2013/05/12
[#54939] [ruby-trunk - Bug #8399][Open] Remove usage of RARRAY_PTR in C extensions when not needed — "dbussink (Dirkjan Bussink)" <d.bussink@...>
32 messages
2013/05/12
[#55001] [ruby-trunk - Bug #8399] Remove usage of RARRAY_PTR in C extensions when not needed
— "dbussink (Dirkjan Bussink)" <d.bussink@...>
2013/05/15
[#55004] Re: [ruby-trunk - Bug #8399] Remove usage of RARRAY_PTR in C extensions when not needed
— SASADA Koichi <ko1@...>
2013/05/15
(2013/05/15 14:38), dbussink (Dirkjan Bussink) wrote:
[#55053] [ruby-trunk - Feature #8426][Open] Implement class hierarchy method caching — "charliesome (Charlie Somerville)" <charliesome@...>
21 messages
2013/05/19
[#55077] Re: [ruby-trunk - Feature #8426][Open] Implement class hierarchy method caching
— SASADA Koichi <ko1@...>
2013/05/20
Great work!
[#55083] Re: [ruby-trunk - Feature #8426][Open] Implement class hierarchy method caching
— Charlie Somerville <charlie@...>
2013/05/20
On Monday, 20 May 2013 at 1:35 PM, SASADA Koichi wrote:
[#55085] Re: [ruby-trunk - Feature #8426][Open] Implement class hierarchy method caching
— SASADA Koichi <ko1@...>
2013/05/20
(2013/05/20 18:21), Charlie Somerville wrote:
[#55058] [ruby-trunk - Feature #5458] DL should be removed — "luislavena (Luis Lavena)" <luislavena@...>
3 messages
2013/05/19
[#55068] Re: [ruby-cvs:48003] zzak:r40834 (trunk): * lib/pp.rb: Document PP::ObjectMixin [Fixes GH-312] — Tanaka Akira <akr@...>
2013/5/20 <zzak@ruby-lang.org>:
7 messages
2013/05/20
[#55071] Re: [ruby-cvs:48003] zzak:r40834 (trunk): * lib/pp.rb: Document PP::ObjectMixin [Fixes GH-312]
— Zachary Scott <zachary@...>
2013/05/20
@akr Oh, thank you for pointing that out!
[#55072] Re: [ruby-cvs:48003] zzak:r40834 (trunk): * lib/pp.rb: Document PP::ObjectMixin [Fixes GH-312]
— Tanaka Akira <akr@...>
2013/05/20
2013/5/20 Zachary Scott <zachary@zacharyscott.net>:
[#55073] Re: [ruby-cvs:48003] zzak:r40834 (trunk): * lib/pp.rb: Document PP::ObjectMixin [Fixes GH-312]
— Zachary Scott <zachary@...>
2013/05/20
On Sun, May 19, 2013 at 10:11 PM, Tanaka Akira <akr@fsij.org> wrote:
[#55075] Re: [ruby-cvs:48003] zzak:r40834 (trunk): * lib/pp.rb: Document PP::ObjectMixin [Fixes GH-312]
— Tanaka Akira <akr@...>
2013/05/20
2013/5/20 Zachary Scott <zachary@zacharyscott.net>:
[#55096] [ruby-trunk - Feature #8430][Open] Rational number literal — "mrkn (Kenta Murata)" <muraken@...>
28 messages
2013/05/21
[#55197] [ruby-trunk - Feature #8461][Open] Easy way to disable certificate checking in XMLRPC::Client — "herwinw (Herwin Weststrate)" <herwin@...>
11 messages
2013/05/29
[#55198] [ruby-trunk - Feature #8462][Open] Module.remove_const inconsistant naming — "kyledecot (Kyle Decot)" <kyle.decot@...>
7 messages
2013/05/29
[ruby-core:54761] [ruby-trunk - Bug #8364][Open] Vim's if_ruby feature sometimes crash.
From:
"ynkdir (Yukihiro Nakadaira)" <yukihiro.nakadaira@...>
Date:
2013-05-03 11:50:39 UTC
List:
ruby-core #54761
Issue #8364 has been reported by ynkdir (Yukihiro Nakadaira).
----------------------------------------
Bug #8364: Vim's if_ruby feature sometimes crash.
https://bugs.ruby-lang.org/issues/8364
Author: ynkdir (Yukihiro Nakadaira)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0p0 (2013-02-24) [x86_64-darwin11.4.2]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN
This problem was originally reported to vim-jp project. See
https://github.com/vim-jp/issues/issues/372 (Japanese discussion).
Vim (http://www.vim.org/) is an text editor and it supports embedded
ruby interface so that we can customize Vim with Ruby. On Mac, ruby
causes crash.
Steps to reproduce:
$ vim
:function! F()
: ruby nil
:endfunction
:call F()
:ruby 10000.times { 'x' * 10000 }
Vim: Caught deadly signal ABRT
Vim: Finished.
Version is:
Mac OS X 10.7.5
ruby-2.0.0-p0
Vim 7.3.918
Maybe the following is minimum C code to reproduce crash.
```c
/* rubyembed.c */
#include <ruby.h>
void rbinit() {
int dummy_argc = 2;
char *dummy_argv[] = {"foo", "-e0"};
RUBY_INIT_STACK;
ruby_init();
ruby_process_options(dummy_argc, dummy_argv);
}
void rbexe(const char *src) {
int state;
rb_eval_string_protect(src, &state);
if (state)
ruby_error_print();
}
void init() {
int eatstack[1024]; /* perhaps you need more to crash */
rbinit();
}
int main(int argc, char **argv) {
init();
rbexe("10000.times { 'x' * 10000 }");
return 0;
}
```
```sh
$ cd ~/tmp/ruby-2.0.0-p0
$ ./configure --prefix=$HOME/tmp/opt && make install
$ cc rubyembed.c -I$HOME/tmp/opt/include/ruby-2.0.0 -I$HOME/tmp/opt/include/ruby-2.0.0/x86_64-darwin11.4.2 -L$HOME/tmp/opt/lib -lruby-static
$ ./a.out
eval:1: [BUG] gc_sweep(): unknown data type 0x0(0x007fb2590651e0) 0x102000
ruby 2.0.0p0 (2013-02-24) [x86_64-darwin11.4.2]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
the more detail of.
-- Control frame information -----------------------------------------------
eval:1: [BUG] object allocation during garbage collection phase
ruby 2.0.0p0 (2013-02-24) [x86_64-darwin11.4.2]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
the more detail of.
-- Control frame information -----------------------------------------------
c:0005 p:---- s:0013 e:000012 CFUNC :*
c:0004 p:0010 s:0009 e:000008 BLOCK eval:1 [FINISH]
c:0003 p:---- s:0007 e:000006 CFUNC :times
c:0002 p:0006 s:0004 e:000003 EVAL eval:1 [FINISH]
c:0001 p:0000 s:0002 E:000d48 TOP [FINISH]
eval:1:in `<main>'
eval:1:in `times'
eval:1:in `block in <main>'
eval:1:in `*'
-- C level backtrace information -------------------------------------------
0 a.out 0x000000010dc0b02b rb_vm_bugreport + 251
1 a.out 0x000000010daa7af8 report_bug + 392
2 a.out 0x000000010daa7dff rb_bug + 207
3 a.out 0x000000010dac89f9 newobj + 297
4 a.out 0x000000010dac910f rb_newobj_of + 31
5 a.out 0x000000010db942a4 str_new + 68
6 a.out 0x000000010db957ee rb_usascii_str_new + 30
7 a.out 0x000000010db13aeb rb_id2str + 107
8 a.out 0x000000010db13cb9 rb_id2name + 9
9 a.out 0x000000010dc0adbb control_frame_dump + 1035
10 a.out 0x000000010dc0afcb rb_vm_bugreport + 155
11 a.out 0x000000010daa7af8 report_bug + 392
12 a.out 0x000000010daa7dff rb_bug + 207
13 a.out 0x000000010dac4803 slot_sweep + 659
14 a.out 0x000000010dac7dcf garbage_collect + 623
15 a.out 0x000000010dac82e5 vm_xmalloc + 149
16 a.out 0x000000010db943a3 str_new + 323
17 a.out 0x000000010db96966 rb_str_times + 118
18 a.out 0x000000010dbecad9 vm_call_cfunc_with_frame + 761
19 a.out 0x000000010dbf21bd vm_exec_core + 14301
20 a.out 0x000000010dbf79d1 vm_exec + 2673
21 a.out 0x000000010dc061fb rb_yield + 507
22 a.out 0x000000010daf7b1d int_dotimes + 61
23 a.out 0x000000010dbecad9 vm_call_cfunc_with_frame + 761
24 a.out 0x000000010dc04f5c vm_call_method + 828
25 a.out 0x000000010dbf0b43 vm_exec_core + 8547
26 a.out 0x000000010dbf79d1 vm_exec + 2673
27 a.out 0x000000010dbf8305 eval_string_with_cref + 693
28 a.out 0x000000010daaddd8 rb_protect + 232
29 a.out 0x000000010da6694f rbexe + 31
30 a.out 0x000000010da669b5 main + 37
31 a.out 0x000000010da668c4 start + 52
-- Other runtime information -----------------------------------------------
* Loaded script: -e
* Loaded features:
0 enumerator.so
1 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/x86_64-darwin11.4.2/enc/encdb.bundle
2 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/x86_64-darwin11.4.2/enc/trans/transdb.bundle
3 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/x86_64-darwin11.4.2/rbconfig.rb
4 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/rubygems/compatibility.rb
5 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/rubygems/defaults.rb
6 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/rubygems/deprecate.rb
7 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/rubygems/errors.rb
8 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/rubygems/version.rb
9 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/rubygems/requirement.rb
10 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/rubygems/platform.rb
11 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/rubygems/specification.rb
12 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/rubygems/exceptions.rb
13 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb
14 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb
15 /Users/yukihiro/tmp/opt/lib/ruby/2.0.0/rubygems.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
```
I am not sure that this is correct fix but above problem seems
disappeared with this.
```diff
diff --git a/thread_pthread.c b/thread_pthread.c
index 8953f5e..58b63b8 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -618,8 +618,10 @@ ruby_init_stack(volatile VALUE *addr
)
{
native_main_thread.id = pthread_self();
-#ifdef STACK_END_ADDRESS
+#if defined(STACK_END_ADDRESS)
native_main_thread.stack_start = STACK_END_ADDRESS;
+#elif defined(STACKADDR_AVAILABLE)
+ native_main_thread.stack_start = pthread_get_stackaddr_np(pthread_self());
#else
if (!native_main_thread.stack_start ||
STACK_UPPER((VALUE *)(void *)&addr,
```
Or perhaps such code is not valid or something is wrong in Vim's if_ruby code?
--
http://bugs.ruby-lang.org/