mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 05:47:26 +08:00
RISC-V: Fix missing initialization of riscv_csr_extra structs
The next pointer of struct riscv_csr_extra was not always initilized to NULL or a valid pointer, causing the assembler to attempt to read through an uninitialized pointer on startup. gas/ChangeLog: * config/tc-riscv.c (riscv_init_csr_hash): NULL initilize next pointer when creating struct riscv_csr_extra.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2020-05-27 Simon Cook <simon.cook@embecosm.com>
|
||||||
|
|
||||||
|
* config/tc-riscv.c (riscv_init_csr_hash): NULL initilize next
|
||||||
|
pointer when creating struct riscv_csr_extra.
|
||||||
|
|
||||||
2020-05-26 H.J. Lu <hongjiu.lu@intel.com>
|
2020-05-26 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* testsuite/gas/i386/align-branch-9.d: Updated for PECOFF.
|
* testsuite/gas/i386/align-branch-9.d: Updated for PECOFF.
|
||||||
|
@ -695,6 +695,7 @@ riscv_init_csr_hash (const char *name,
|
|||||||
entry->address = address;
|
entry->address = address;
|
||||||
entry->define_version = define_version;
|
entry->define_version = define_version;
|
||||||
entry->abort_version = abort_version;
|
entry->abort_version = abort_version;
|
||||||
|
entry->next = NULL;
|
||||||
|
|
||||||
/* If the CSR hasn't been inserted in the hash table, then insert it.
|
/* If the CSR hasn't been inserted in the hash table, then insert it.
|
||||||
Otherwise, attach the extra information to the entry which is already
|
Otherwise, attach the extra information to the entry which is already
|
||||||
|
Reference in New Issue
Block a user