Fix potential illegal memory access in Xtensa port.
* xtensa-isa.c (xtensa_isa_init): Don't update lookup table entries for sysregs with negative indices.
This commit is contained in:
parent
75800d2cd6
commit
d84ed528d4
@ -1,3 +1,8 @@
|
||||
2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
|
||||
|
||||
* xtensa-isa.c (xtensa_isa_init): Don't update lookup table
|
||||
entries for sysregs with negative indices.
|
||||
|
||||
2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
|
||||
|
||||
* elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
|
||||
|
@ -292,7 +292,8 @@ xtensa_isa_init (xtensa_isa_status *errno_p, char **error_msg_p)
|
||||
xtensa_sysreg_internal *sreg = &isa->sysregs[n];
|
||||
is_user = sreg->is_user;
|
||||
|
||||
isa->sysreg_table[is_user][sreg->number] = n;
|
||||
if (sreg->number >= 0)
|
||||
isa->sysreg_table[is_user][sreg->number] = n;
|
||||
}
|
||||
|
||||
/* Set up the interface lookup table. */
|
||||
|
Loading…
Reference in New Issue
Block a user