Comment #4 on issue 1764 by [email protected]: Stack Size issues in Windows
http://code.google.com/p/v8/issues/detail?id=1764

More detail (now I have read the linked node.js issue for more context).

We fail in debug mode, and it is deliberate, because we are being asked for a stack usage limit larger than the actual stack. It's so much larger that it's more space than there is below the current stack pointer, even if the stack could go all the way down to location 0.

That means that nothing will stop V8 from crashing by accessing non-reserved stack memory before meeting our limit. Failing the assertion is a good thing in that case. We don't fail the assert in all cases because we don't actually know the size or limit of the reserved stack, it's only when the error becomes so obvious that we can be certain that the limit is too high.

The test could be more obvious - e.g., testing for overflow by asserting that the calculated limit address is lower than the current stack pointer, but the end result is the same - the assert fails (or the release build crashes) if you request a stack size larger than what's provided.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to