ruby-changes:28754
From: nobu <ko1@a...>
Date: Sat, 18 May 2013 15:49:31 +0900 (JST)
Subject: [ruby-changes:28754] nobu:r40806 (trunk): vm_core.h: move jmpbuf between tag and prev
nobu 2013-05-18 15:49:19 +0900 (Sat, 18 May 2013) New Revision: 40806 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40806 Log: vm_core.h: move jmpbuf between tag and prev * vm_core.h (rb_vm_tag): move jmpbuf between tag and prev so ensure to be accessible. Modified files: trunk/ChangeLog trunk/eval_intern.h trunk/vm_core.h Index: eval_intern.h =================================================================== --- eval_intern.h (revision 40805) +++ eval_intern.h (revision 40806) @@ -91,20 +91,9 @@ extern int select_large_fdset(int, fd_se https://github.com/ruby/ruby/blob/trunk/eval_intern.h#L91 rb_fiber_start(); \ } while (0) -/* - ensure tag to be accessible, `buf' is at the beginning. - the end is `prev' which is written in TH_PUSH_TAG(). -*/ -#if defined(__GNUC__) && __GNUC__ >= 4 -/* suppress -Wstrict-aliasing, and should be inlined */ -# define ENSURE_TAG_WRITABLE(tag) MEMZERO((tag).buf, int, 1) -#else -# define ENSURE_TAG_WRITABLE(tag) (*(volatile int *)(tag).buf = 0) -#endif #define TH_PUSH_TAG(th) do { \ rb_thread_t * const _th = (th); \ struct rb_vm_tag _tag; \ - ENSURE_TAG_WRITABLE(_tag); \ _tag.tag = 0; \ _tag.prev = _th->tag; \ _th->tag = &_tag; Index: ChangeLog =================================================================== --- ChangeLog (revision 40805) +++ ChangeLog (revision 40806) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat May 18 15:49:14 2013 Nobuyoshi Nakada <nobu@r...> + + * vm_core.h (rb_vm_tag): move jmpbuf between tag and prev so ensure to + be accessible. + Sat May 18 11:05:14 2013 Nobuyoshi Nakada <nobu@r...> * enumerator.c (inspect_enumerator): use VALUE instead of mere char* Index: vm_core.h =================================================================== --- vm_core.h (revision 40805) +++ vm_core.h (revision 40806) @@ -464,10 +464,14 @@ enum rb_thread_status { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L464 typedef RUBY_JMP_BUF rb_jmpbuf_t; +/* + the members which are written in TH_PUSH_TAG() should be placed at + the beginning and the end, so that entire region is accessible. +*/ struct rb_vm_tag { - rb_jmpbuf_t buf; VALUE tag; VALUE retval; + rb_jmpbuf_t buf; struct rb_vm_tag *prev; }; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/