PR26508 UBSAN: tc-xtensa.c:7764 null pointer bsearch
PR 26508 * config/tc-xtensa.c (xg_get_trampoline_chain): Return early when n_entries is zero.
This commit is contained in:
parent
4d43072582
commit
e637b7ba2f
@ -1,3 +1,9 @@
|
||||
2020-08-26 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 26508
|
||||
* config/tc-xtensa.c (xg_get_trampoline_chain): Return early
|
||||
when n_entries is zero.
|
||||
|
||||
2020-08-26 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 26448
|
||||
|
||||
@ -7753,6 +7753,9 @@ xg_get_trampoline_chain (struct trampoline_seg *ts,
|
||||
struct trampoline_chain_index *idx = &ts->chain_index;
|
||||
struct trampoline_chain c;
|
||||
|
||||
if (idx->n_entries == 0)
|
||||
return NULL;
|
||||
|
||||
if (idx->needs_sorting)
|
||||
{
|
||||
qsort (idx->entry, idx->n_entries, sizeof (*idx->entry),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user