From b9e0ee8e7ec0cbc6d194fe220c71a5c39a2560e7 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 10 Feb 2012 11:42:33 -0800 Subject: [PATCH] rt: Add docs to stack functions --- src/rt/rust_stack.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rt/rust_stack.h b/src/rt/rust_stack.h index f310b044acb..f6704a9f0eb 100644 --- a/src/rt/rust_stack.h +++ b/src/rt/rust_stack.h @@ -19,12 +19,15 @@ const uint8_t stack_canary[] = {0xAB, 0xCD, 0xAB, 0xCD, 0xAB, 0xCD, 0xAB, 0xCD, 0xAB, 0xCD, 0xAB, 0xCD}; +// Used by create_stack void register_valgrind_stack(stk_seg *stk); +// Used by destroy_stack void deregister_valgrind_stack(stk_seg *stk); +// Used by create_stack void add_stack_canary(stk_seg *stk); @@ -47,9 +50,12 @@ destroy_stack(T allocer, stk_seg *stk) { allocer->free(stk); } +// Must be called before each time a stack is reused to tell valgrind +// that the stack is accessible. void prepare_valgrind_stack(stk_seg *stk); +// Run a sanity check void check_stack_canary(stk_seg *stk);