"make selftest-valgrind" shows a couple of leaks, presumably introduced in r264052 (PR driver/83193):
440 bytes in 1 blocks are definitely lost in loss record 590 of 668 at 0x4A083AA: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x20C4AAC: xrealloc (xmalloc.c:179) by 0x92AB9F: void va_heap::reserve<char const*>(vec<char const*, va_heap, vl_embed>*&, unsigned int, bool) (vec.h:288) by 0x92A809: vec<char const*, va_heap, vl_ptr>::reserve(unsigned int, bool) (vec.h:1621) by 0x92A0B1: vec<char const*, va_heap, vl_ptr>::safe_push(char const* const&) (vec.h:1730) by 0x200F9AC: ix86_get_valid_option_values(int, char const*) (i386-common.c:1714) by 0x20385A9: option_proposer::build_option_suggestions(char const*) (opt-suggestions.c:143) by 0x203829B: option_proposer::get_completions(char const*, auto_string_vec&) (opt-suggestions.c:84) by 0x2038919: selftest::verify_autocompletions(option_proposer&, char const*) (opt-suggestions.c:234) by 0x2038A9D: selftest::test_completion_valid_options(option_proposer&) (opt-suggestions.c:306) by 0x20399BE: selftest::opt_proposer_c_tests() (opt-suggestions.c:427) by 0x1FA6082: selftest::run_tests() (selftest-run-tests.c:74) 976 bytes in 1 blocks are definitely lost in loss record 604 of 668 at 0x4A083AA: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x20C4AAC: xrealloc (xmalloc.c:179) by 0x92AB9F: void va_heap::reserve<char const*>(vec<char const*, va_heap, vl_embed>*&, unsigned int, bool) (vec.h:288) by 0x92A809: vec<char const*, va_heap, vl_ptr>::reserve(unsigned int, bool) (vec.h:1621) by 0x92A0B1: vec<char const*, va_heap, vl_ptr>::safe_push(char const* const&) (vec.h:1730) by 0x200F972: ix86_get_valid_option_values(int, char const*) (i386-common.c:1710) by 0x20385A9: option_proposer::build_option_suggestions(char const*) (opt-suggestions.c:143) by 0x203829B: option_proposer::get_completions(char const*, auto_string_vec&) (opt-suggestions.c:84) by 0x2038919: selftest::verify_autocompletions(option_proposer&, char const*) (opt-suggestions.c:234) by 0x2038A9D: selftest::test_completion_valid_options(option_proposer&) (opt-suggestions.c:306) by 0x20399BE: selftest::opt_proposer_c_tests() (opt-suggestions.c:427) by 0x1FA6082: selftest::run_tests() (selftest-run-tests.c:74) With this patch, "make selftest-valgrind" is clean again. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Committed to trunk as r264698, under the "obvious" rule. gcc/ChangeLog: * opt-suggestions.c (option_proposer::build_option_suggestions): Release "option_values". --- gcc/opt-suggestions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/opt-suggestions.c b/gcc/opt-suggestions.c index c68c9ee..9444a35 100644 --- a/gcc/opt-suggestions.c +++ b/gcc/opt-suggestions.c @@ -152,6 +152,7 @@ option_proposer::build_option_suggestions (const char *prefix) free (with_arg); } } + option_values.release (); } else add_misspelling_candidates (m_option_suggestions, option, -- 1.8.5.3