2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>

hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.

From-SVN: r262931
This commit is contained in:
Bernd Edlinger 2018-07-23 12:48:48 +00:00 committed by Bernd Edlinger
parent 9fede15c4d
commit 723f415edc
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.

View file

@ -776,11 +776,11 @@ static void
dump_hsa_symbol (FILE *f, hsa_symbol *symbol)
{
const char *name;
char buf[64];
if (symbol->m_name)
name = symbol->m_name;
else
{
char buf[64];
sprintf (buf, "__%s_%i", hsa_seg_name (symbol->m_segment),
symbol->m_name_number);