Skip to content

Commit

Permalink
Fix argument to VirtualProtect.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jun 3, 2019
1 parent 3a808e5 commit 15841f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cont.c
Expand Up @@ -199,7 +199,7 @@ fiber_pool_expand(struct fiber_pool * fiber_pool, size_t size, size_t count)
for (i = 0; i < count; i += 1) {
void * base = (char*)allocation->base + (size * i);

if (!VirtualProtect(stack, RB_PAGE_SIZE, PAGE_READWRITE | PAGE_GUARD, &old_protect)) {
if (!VirtualProtect(base, RB_PAGE_SIZE, PAGE_READWRITE | PAGE_GUARD, &old_protect)) {
VirtualFree(allocation->base, 0, MEM_RELEASE);
rb_raise(rb_eFiberError, "can't set a guard page: %s", ERRNOMSG);
}
Expand Down

0 comments on commit 15841f4

Please sign in to comment.