Segmentation fault i386-gen
A case of inst->next being uninitialised. * i386-gen.c (parse_template): Ensure entire template_instance is initialised.
This commit is contained in:
parent
1c9c9b9b55
commit
c3ffb8f340
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2021-01-26 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* i386-gen.c (parse_template): Ensure entire template_instance
|
||||
is initialised.
|
||||
|
||||
2021-01-15 Nelson Chu <nelson.chu@sifive.com>
|
||||
|
||||
* riscv-opc.c (riscv_gpr_names_abi): Aligned the code.
|
||||
|
|
|
@ -1576,6 +1576,8 @@ parse_template (char *buf, int lineno)
|
|||
*end++ = '\0';
|
||||
|
||||
inst = xmalloc (sizeof (*inst));
|
||||
inst->next = NULL;
|
||||
inst->args = NULL;
|
||||
|
||||
cur = next_field (buf, ':', &next, end);
|
||||
inst->name = xstrdup (cur);
|
||||
|
|
Loading…
Add table
Reference in a new issue