commit 8105290a1e8cc4bda9b9bb7e9583b9282fcb1cb1
parent c43561c89b53aa1ccd0d98acd400ad059ab99fb0
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 13 Nov 2021 08:18:32 +0100
cc1: Fix double free() error
The commit e8a346f9 tried to fix the double free() error
detected using stress testing. The problem with that solution
was that it could not work with macro expansion because it
only concatenated consecutive strings, but it didn't considered
strings resulting of macro expansion.
Diffstat:
1 file changed, 0 insertions(+), 1 deletion(-)
diff --git a/src/cmd/cc/cc1/expr.c b/src/cmd/cc/cc1/expr.c
@@ -607,7 +607,6 @@ adjstrings(Symbol *sym)
s = xrealloc(s, len + n + 1);
memcpy(s+len, t, n);
s[len + n] = '\0';
- killsym(yylval.sym);
}
++len;
if (tp->n.elem != len) {