summaryrefslogtreecommitdiff
path: root/src/base/fiber.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-11-16 17:07:42 -0800
committerGabe Black <gabeblack@google.com>2018-11-18 10:44:26 +0000
commit5bfde967dcbbfae884e343425da1fc069a9c4b86 (patch)
tree74238175235f5286797fe41edff55666974dde6b /src/base/fiber.hh
parent040fabe2bd1d3e34dc2855b2b443af503b967c6b (diff)
downloadgem5-5bfde967dcbbfae884e343425da1fc069a9c4b86.tar.xz
base: Set up a guard page for fiber stacks.
This will help detect stack overflow for fibers. Change-Id: Iff2b102120ec351709e495291d6bead597f8d10c Reviewed-on: https://gem5-review.googlesource.com/c/14395 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/base/fiber.hh')
-rw-r--r--src/base/fiber.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/base/fiber.hh b/src/base/fiber.hh
index 3d82075f0..4d95e032b 100644
--- a/src/base/fiber.hh
+++ b/src/base/fiber.hh
@@ -106,8 +106,10 @@ class Fiber
Fiber *link;
// The stack for this context, or a nullptr if allocated elsewhere.
- uint8_t *stack;
+ void *stack;
size_t stackSize;
+ void *guardPage;
+ size_t guardPageSize;
#if HAVE_VALGRIND
unsigned valgrindStackId;
#endif