0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-10 14:08:56 +02:00

ircd:Ⓜ️:vm: Add stack usage assertion at eval entry.

This commit is contained in:
Jason Volk 2019-09-09 12:53:34 -07:00
parent db8e28f585
commit ebb2f21d61

View file

@ -669,9 +669,20 @@ ircd::m::vm::execute(eval &eval,
const event &event)
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
const scope_count executing{eval::executing};
const scope_notify notify{vm::dock};
const scope_count executing
{
eval::executing
};
const scope_notify notify
{
vm::dock
};
// Set a member pointer to the event currently being evaluated. This
// allows other parallel evals to have deep access to this eval.