mirror of
https://github.com/frida/tinycc
synced 2025-01-05 03:24:25 +03:00
fix cleanup with for loop initialisation
Signed-off-by: matthias <uso.cosmo.ray@gmail.com>
This commit is contained in:
parent
0d54946dec
commit
14be3a1dc1
6
tccgen.c
6
tccgen.c
@ -6276,6 +6276,9 @@ static void block(int *bsym, Sym *bcl, int *csym, Sym *ccl, int is_expr)
|
|||||||
} else if (tok == TOK_FOR) {
|
} else if (tok == TOK_FOR) {
|
||||||
int e;
|
int e;
|
||||||
int saved_nocode_wanted;
|
int saved_nocode_wanted;
|
||||||
|
Sym *lcleanup = current_cleanups;
|
||||||
|
int lncleanups = ncleanups;
|
||||||
|
|
||||||
nocode_wanted &= ~0x20000000;
|
nocode_wanted &= ~0x20000000;
|
||||||
next();
|
next();
|
||||||
skip('(');
|
skip('(');
|
||||||
@ -6317,6 +6320,9 @@ static void block(int *bsym, Sym *bcl, int *csym, Sym *ccl, int is_expr)
|
|||||||
gsym(a);
|
gsym(a);
|
||||||
gsym_addr(b, c);
|
gsym_addr(b, c);
|
||||||
--local_scope;
|
--local_scope;
|
||||||
|
try_call_scope_cleanup(lcleanup);
|
||||||
|
ncleanups = lncleanups;
|
||||||
|
current_cleanups = lcleanup;
|
||||||
sym_pop(&local_stack, s, 0);
|
sym_pop(&local_stack, s, 0);
|
||||||
|
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user