[#70257] [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI — ko1@...

Issue #11420 has been reported by Koichi Sasada.

11 messages 2015/08/06

[ruby-core:70364] [Ruby trunk - Bug #11438] [Open] native_thread_init_stack() get machine.stack_start unequal to thread's stack start address, x86 win32

From: rickerliang@...
Date: 2015-08-13 07:31:11 UTC
List: ruby-core #70364
Issue #11438 has been reported by l ly.

----------------------------------------
Bug #11438: native_thread_init_stack() get machine.stack_start unequal to thread's stack start address, x86 win32
https://bugs.ruby-lang.org/issues/11438

* Author: l ly
* Status: Open
* Priority: Normal
* Assignee: cruby-windows
* ruby -v: 2.2.2
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
In function native_thread_init_stack() use VirtualQuery to get thread's stack start address.But some situation(ruby embbed in other application and initial it on the fly),native_thread_init_stack() will be called at low stack address and VirtualQuery return memory info BaseAddress + RegionSize < thread stack base(teb.StackBase).
In this situation,subsequently call stack_check() at high stack address will cause stack_overflow exception,because esp > machine.stack_start:
(teb.StackLimit < machine.stack_start < esp < teb.StackBase)
but actually it is not stack overflow at this time.
Use teb.StackBase instead of VirtualQuery get thread stack base is a more reliable solution.



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next