From 12e5434eebbda59c548c2c46364a99337edf3e52 Mon Sep 17 00:00:00 2001 From: Tony Mann Date: Thu, 23 Apr 1998 10:42:09 +0100 Subject: [PATCH] Ensure the return code of poolaccess gets checked Copied from Perforce Change: 19445 ServerID: perforce.ravenbrook.com --- mps/src/arena.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mps/src/arena.c b/mps/src/arena.c index b33c13f8b20..2e5c5d9ae6a 100644 --- a/mps/src/arena.c +++ b/mps/src/arena.c @@ -1,6 +1,6 @@ /* impl.c.arena: ARENA IMPLEMENTATION * - * $HopeName: MMsrc!arena.c(trunk.36) $ + * $HopeName: MMsrc!arena.c(trunk.37) $ * Copyright (C) 1998. Harlequin Group plc. All rights reserved. * * .readership: Any MPS developer @@ -36,7 +36,7 @@ #include "poolmrg.h" #include "mps.h" -SRCID(arena, "$HopeName: MMsrc!arena.c(trunk.36) $"); +SRCID(arena, "$HopeName: MMsrc!arena.c(trunk.37) $"); /* All static data objects are declared here. See .static */ @@ -473,6 +473,7 @@ Bool ArenaAccess(Addr addr, AccessSet mode, MutatorFaultContext context) { Seg seg; Ring node, nextNode; + Res res; LockClaim(&arenaRingLock); /* design.mps.arena.lock.ring */ RING_FOR(node, &arenaRing, nextNode) { @@ -493,8 +494,10 @@ Bool ArenaAccess(Addr addr, AccessSet mode, MutatorFaultContext context) * a separate thread. */ mode &= SegPM(seg); - if(mode != AccessSetEMPTY) - PoolAccess(SegPool(seg), seg, addr, mode, context); + if(mode != AccessSetEMPTY) { + res = PoolAccess(SegPool(seg), seg, addr, mode, context); + AVER(res == ResOK); /* Mutator can't continue unless this succeeds */ + } ArenaLeave(arena); return TRUE; } else if(RootOfAddr(&root, arena, addr)) {