mirror of
https://github.com/matrix-construct/construct
synced 2024-09-27 11:18:51 +02:00
ircd:Ⓜ️:vm: Add stack usage assertion at eval entry.
This commit is contained in:
parent
db8e28f585
commit
ebb2f21d61
1 changed files with 13 additions and 2 deletions
|
@ -669,9 +669,20 @@ ircd::m::vm::execute(eval &eval,
|
||||||
const event &event)
|
const event &event)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// This assertion is tripped if the end of your context's stack is
|
||||||
|
// danger close; try increasing your stack size.
|
||||||
|
const ctx::stack_usage_assertion sua;
|
||||||
|
|
||||||
// m::vm bookkeeping that someone entered this function
|
// m::vm bookkeeping that someone entered this function
|
||||||
const scope_count executing{eval::executing};
|
const scope_count executing
|
||||||
const scope_notify notify{vm::dock};
|
{
|
||||||
|
eval::executing
|
||||||
|
};
|
||||||
|
|
||||||
|
const scope_notify notify
|
||||||
|
{
|
||||||
|
vm::dock
|
||||||
|
};
|
||||||
|
|
||||||
// Set a member pointer to the event currently being evaluated. This
|
// Set a member pointer to the event currently being evaluated. This
|
||||||
// allows other parallel evals to have deep access to this eval.
|
// allows other parallel evals to have deep access to this eval.
|
||||||
|
|
Loading…
Reference in a new issue