+2019-01-23 David Malcolm <dmalcolm@redhat.com>
+
+ PR driver/89014
+ * config/aarch64/driver-aarch64.c (host_detect_local_cpu): Fix
+ use-after-free of the result of
+ aarch64_get_extension_string_for_isa_flags.
+
2019-01-23 Jakub Jelinek <jakub@redhat.com>
PR c/44715
unsigned int variants[2] = { ALL_VARIANTS, ALL_VARIANTS };
unsigned int n_variants = 0;
bool processed_exts = false;
- const char *ext_string = "";
unsigned long extension_flags = 0;
unsigned long default_flags = 0;
if (tune)
return res;
- ext_string
- = aarch64_get_extension_string_for_isa_flags (extension_flags,
- default_flags).c_str ();
-
- res = concat (res, ext_string, NULL);
+ {
+ std::string extension
+ = aarch64_get_extension_string_for_isa_flags (extension_flags,
+ default_flags);
+ res = concat (res, extension.c_str (), NULL);
+ }
return res;