summaryrefslogtreecommitdiffstats
path: root/common/bbs
diff options
context:
space:
mode:
Diffstat (limited to 'common/bbs')
-rw-r--r--common/bbs/cache.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/bbs/cache.c b/common/bbs/cache.c
index a23326bd..e224e5f4 100644
--- a/common/bbs/cache.c
+++ b/common/bbs/cache.c
@@ -104,6 +104,12 @@ attach_SHM(void)
"or use ipcrm(1) command to clean share memory.\n");
exit(1);
}
+ if(SHM->size != sizeof(SHM_t)) {
+ fprintf(stderr, "Error: SHM->size(%d) != sizeof(SHM_t)(%d)\n", SHM->size, sizeof(SHM_t));
+ fprintf(stderr, "Please use the configuration corresponding to SHM,\n"
+ "or use ipcrm(1) command to clean share memory.\n");
+ exit(1);
+ }
if (!SHM->loaded) /* (uhash) assume fresh shared memory is
* zeroed */
exit(1);