Nikolay Sivov (@nsivov) commented about dlls/ntdll/actctx.c:
ACTIVATION_CONTEXT_STACK *actctx_stack = teb->ActivationContextStackPointer; RTL_ACTIVATION_CONTEXT_STACK_FRAME *frame;
- if (flags != 0)
return STATUS_INVALID_PARAMETER;
- frame = RtlAllocateHeap( GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, sizeof(*frame) ); frame->Previous = actctx_stack->ActiveFrame; frame->ActivationContext = handle;
- frame->Flags = 0;
- frame->Flags = 0x20 | NTDLL_STACK_FRAME_ALLOCATED; actctx_stack->ActiveFrame = frame;
This needs a better name to make it clear, like _HEAP_ALLOCATED. Stack ones are also allocated in a sense. And same as for tests, we don't need to include 0x20 mask until we know what it does.