1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.c (ruby_get_stack_grow_direction): no needs to use thread

here, and not initialized yet.  [ruby-core:22439]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-02-27 09:01:21 +00:00
parent 12331d4939
commit be7679308b
3 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Fri Feb 27 18:01:20 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gc.c (ruby_get_stack_grow_direction): no needs to use thread
here, and not initialized yet. [ruby-core:22439]
Fri Feb 27 17:45:25 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> Fri Feb 27 17:45:25 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (file_load_ok): checks if regular file, except for the * file.c (file_load_ok): checks if regular file, except for the

6
gc.c
View file

@ -1102,10 +1102,10 @@ int ruby_stack_grow_direction;
int int
ruby_get_stack_grow_direction(VALUE *addr) ruby_get_stack_grow_direction(VALUE *addr)
{ {
rb_thread_t *th = GET_THREAD(); VALUE *end;
SET_STACK_END; SET_MACHINE_STACK_END(&end);
if (STACK_END > addr) return ruby_stack_grow_direction = 1; if (end > addr) return ruby_stack_grow_direction = 1;
return ruby_stack_grow_direction = -1; return ruby_stack_grow_direction = -1;
} }
#endif #endif

View file

@ -275,7 +275,7 @@ ruby_init_stack(VALUE *addr
native_main_thread.stack_start = STACK_END_ADDRESS; native_main_thread.stack_start = STACK_END_ADDRESS;
#else #else
if (!native_main_thread.stack_start || if (!native_main_thread.stack_start ||
STACK_UPPER(&addr, STACK_UPPER((VALUE *)(void *)&addr,
native_main_thread.stack_start > addr, native_main_thread.stack_start > addr,
native_main_thread.stack_start < addr)) { native_main_thread.stack_start < addr)) {
native_main_thread.stack_start = addr; native_main_thread.stack_start = addr;