Skip to content
Snippets Groups Projects
Commit c554b4da authored by Ben Gamari's avatar Ben Gamari
Browse files

rts/CloneStack: Bounds check array write

parent 2e592857
No related branches found
No related tags found
No related merge requests found
......@@ -196,6 +196,9 @@ void copyPtrsToArray(Capability *cap, StgMutArrPtrs* arr, StgStack* stack) {
index++;
}
// Ensure that we didn't overflow the result array
ASSERT(index-1 < arr->ptrs);
// check whether the stack ends in an underflow frame
StgUnderflowFrame *frame = (StgUnderflowFrame *) (last_stack->stack
+ last_stack->stack_size - sizeofW(StgUnderflowFrame));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment