Branch: Tag:

2020-10-20

2020-10-20 13:09:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix type stack mark leak.

low_type_binop() leaked type stack marks in some cases when handling
PT_BINOP_MINUS of function types.

4621:    if (got_empty) goto function_next;    }    +  /* Note: We have pushed two typoe stack marks earlier, +  * so we need to get rid of them before returning. +  */    if (!got_full) { -  +  pop_stack_mark(); +  pop_stack_mark();    return NULL;    }    -  type_stack_mark(); +  pop_stack_mark();    push_remap_markers(a, NULL, remap, remap_flags);    return pop_unfinished_type();    }