* blacklst.c (GC_bl_init): Add assertion that GC_old_stack_bl and
GC_incomplete_stack_bl are both null prior to their assignment (to the
result of GC_scratch_alloc).
* mark.c (alloc_mark_stack): Replace GC_mark_stack_size!=0 with
GC_mark_stack!=NULL (to ensure no memory leak when GC_mark_stack is
assigned for the first time).
* misc.c [GC_READ_ENV_FILE && (MSWIN32 || MSWINCE || CYGWIN32)]
(GC_envfile_init): Add assertion that GC_envfile_content is null prior
to its assignment.
if (!GC_all_interior_pointers) {
GC_bl_init_no_interiors();
}
+ GC_ASSERT(NULL == GC_old_stack_bl && NULL == GC_incomplete_stack_bl);
GC_old_stack_bl = (word *)GC_scratch_alloc(sizeof(page_hash_table));
GC_incomplete_stack_bl = (word *)GC_scratch_alloc(sizeof(page_hash_table));
if (GC_old_stack_bl == 0 || GC_incomplete_stack_bl == 0) {
# endif
GC_mark_stack_too_small = FALSE;
- if (GC_mark_stack_size != 0) {
+ if (GC_mark_stack != NULL) {
if (new_stack != 0) {
if (recycle_old) {
/* Recycle old space */
if (content[ofs] == '\r' || content[ofs] == '\n')
content[ofs] = '\0';
}
+ GC_ASSERT(NULL == GC_envfile_content);
GC_envfile_length = len + 1;
GC_envfile_content = content;
# endif