Unified · Split
| @@ -689,6 +689,7 @@ ST_FUNC int tcc_open(TCCState *s1, const char *filename) · 688 unmodified lines | ||
| 689 | 689 | static int tcc_compile(TCCState *s1) |
| 690 | 690 | { |
| 691 | 691 | Sym *define_start; |
| 692 | + SValue *pvtop; | |
| 692 | 693 | char buf[512]; |
| 693 | 694 | volatile int section_sym; |
| 694 | 695 | |
| @@ -758,6 +759,7 @@ static int tcc_compile(TCCState *s1) · 63 unmodified lines | ||
| 758 | 759 | |
| 759 | 760 | define_start = define_stack; |
| 760 | 761 | nocode_wanted = 1; |
| 762 | + pvtop = vtop; | |
| 761 | 763 | |
| 762 | 764 | if (setjmp(s1->error_jmp_buf) == 0) { |
| 763 | 765 | s1->nb_errors = 0; |
| @@ -787,6 +789,8 @@ static int tcc_compile(TCCState *s1) · 23 unmodified lines | ||
| 787 | 789 | |
| 788 | 790 | sym_pop(&global_stack, NULL); |
| 789 | 791 | sym_pop(&local_stack, NULL); |
| 792 | + if (pvtop != vtop) | |
| 793 | + warning("internal compiler error: vstack leak? (%d)", vtop - pvtop); | |
| 790 | 794 | |
| 791 | 795 | return s1->nb_errors != 0 ? -1 : 0; |
| 792 | 796 | } |