commit 393c1bfe7ae06ca89378b050a460db5d9ae484f2
parent 7d04db9269280cbbf13a16514fd2a232474b99c2
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) {