Skip to content

Commit

Permalink
merges r22659 from trunk into ruby_1_9_1.
Browse files Browse the repository at this point in the history
--
* 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/branches/ruby_1_9_1@22748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
yugui committed Mar 4, 2009
1 parent 079741a commit cc5164a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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>

* file.c (file_load_ok): checks if regular file, except for the
Expand Down
6 changes: 3 additions & 3 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1102,10 +1102,10 @@ int ruby_stack_grow_direction;
int
ruby_get_stack_grow_direction(VALUE *addr)
{
rb_thread_t *th = GET_THREAD();
SET_STACK_END;
VALUE *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;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion thread_pthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ ruby_init_stack(VALUE *addr
native_main_thread.stack_start = STACK_END_ADDRESS;
#else
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;
Expand Down

0 comments on commit cc5164a

Please sign in to comment.