To 1.1, where memory problem with "blowing out sync_group[]" got observed.
---------------------------- revision 1.86.2.14 date: 2006/10/23 22:00:31; author: cbbrowne; state: Exp; lines: +5 -5 Add #define of MAXGROUPSIZE (100, in version 1.1) Allocate the array sync_group[] to size MAXGROUPSIZE+1, to allow next_sync_group_size to get all the way to MAXGROUPSIZE without blowing out the end of the array Add into the while loop that increments sync_group_size a check that we haven't exceeded MAXGROUPSIZE. That way we won't blow past the end of the array if next_sync_group_size gets set too high. ---------------------------- I added in a #define for MAXGROUPSIZE, which indicates the actual size of the array sync_group[]. The while loop that accesses that array now has a clause that makes sure we don't blow past the end. To HEAD and 1_2_STABLE ---------------------------- revision 1.125 date: 2006/10/23 21:56:10; author: cbbrowne; state: Exp; lines: +4 -4 Three changes: 1. Allocate an extra entry in sync_group - SlonWorkMsg_event *sync_group[MAXGROUPSIZE+1]; That way, we can get the value of sync_group_size all the way to MAXGROUPSIZE and not blow out the end of the array. 2. Add into the while loop that increments sync_group_size a check that we haven't exceeded MAXGROUPSIZE. That way we won't blow past the end of the array if next_sync_group_size gets set too high. 3. Logic for processing return code from fclose() treats "nonzero" as the error condition as per H&S Section 15.2 ---------------------------- The fclose() change shouldn't visibly change behaviour; the normal behaviour is for it to either return 0 (success) or -1 (failure); the change is to more precisely regard that success case. -- let name="cbbrowne" and tld="ca.afilias.info" in name ^ "@" ^ tld;; <http://dba2.int.libertyrms.com/> Christopher Browne (416) 673-4124 (land) _______________________________________________ Slony1-general mailing list [email protected] http://gborg.postgresql.org/mailman/listinfo/slony1-general
