Re: [PATCH] aarch64: fix use-after-free in -march=native (PR driver/89014)

2019-01-23 Thread Richard Earnshaw (lists)
On 23/01/2019 17:12, David Malcolm wrote: > Running: > $ valgrind ./xgcc -B. -c test.c -march=native > on aarch64 shows a use-after-free in host_detect_local_cpu due > to the std::string result of aarch64_get_extension_string_for_isa_flags > only living until immediately after a c_str call. > >

[PATCH] aarch64: fix use-after-free in -march=native (PR driver/89014)

2019-01-23 Thread David Malcolm
Running: $ valgrind ./xgcc -B. -c test.c -march=native on aarch64 shows a use-after-free in host_detect_local_cpu due to the std::string result of aarch64_get_extension_string_for_isa_flags only living until immediately after a c_str call. This leads to corrupt "-march=" values being passed to