| # This is a valgrind suppressions file. |
| |
| # There is a slight overhead to using some parts of libnih in the form |
| # of a heap-allocated list head used to link all allocated structures |
| # by that component. |
| # |
| # They are allocated the first time that part of libnih is used by the |
| # static nih_*_init function; valgrind complains because they are not |
| # freed before exit, as there's little point to doing so. |
| |
| { |
| nih-child-init |
| Memcheck:Leak |
| fun:malloc |
| fun:nih_alloc |
| fun:nih_list_new |
| fun:nih_child_init |
| } |
| |
| { |
| nih-error-init |
| Memcheck:Leak |
| fun:malloc |
| fun:nih_alloc |
| fun:nih_list_new |
| fun:nih_error_init |
| } |
| { |
| nih-error-init |
| Memcheck:Leak |
| fun:malloc |
| fun:nih_alloc_ref_new |
| fun:nih_alloc |
| fun:nih_error_push_context |
| fun:nih_error_init |
| } |
| |
| { |
| nih-file-init |
| Memcheck:Leak |
| fun:malloc |
| fun:nih_alloc |
| fun:nih_list_new |
| fun:nih_file_init |
| } |
| |
| { |
| nih-io-init |
| Memcheck:Leak |
| fun:malloc |
| fun:nih_alloc |
| fun:nih_list_new |
| fun:nih_io_init |
| } |
| |
| { |
| nih-signal-init |
| Memcheck:Leak |
| fun:malloc |
| fun:nih_alloc |
| fun:nih_list_new |
| fun:nih_signal_init |
| } |
| |
| { |
| nih-timer-init |
| Memcheck:Leak |
| fun:malloc |
| fun:nih_alloc |
| fun:nih_list_new |
| fun:nih_timer_init |
| } |
| |
| { |
| nih-main-loop-init |
| Memcheck:Leak |
| fun:malloc |
| fun:nih_alloc |
| fun:nih_list_new |
| fun:nih_main_loop_init |
| } |
| |
| |
| # nih_main_init_full stores the pacakge_string string in a |
| # heap-allocated pointer. It survives the life of the process and |
| # is only not freed because there's little point in doing so. |
| { |
| nih-package-string |
| Memcheck:Leak |
| fun:malloc |
| fun:nih_alloc |
| fun:nih_vsprintf |
| fun:nih_sprintf |
| fun:nih_main_init_full |
| } |
| { |
| nih-package-string-test |
| Memcheck:Leak |
| fun:malloc |
| fun:realloc |
| fun:_test_realloc |
| fun:_test_malloc |
| fun:nih_alloc |
| fun:nih_vsprintf |
| fun:nih_sprintf |
| fun:nih_main_init_full |
| } |
| |
| # tmpfile is used by some test cases ... valgrind doesn't have a built-in |
| # suppression for it. |
| { |
| glibc-tmpfile |
| Memcheck:Leak |
| fun:malloc |
| fun:fdopen |
| fun:tmpfile |
| } |
| |
| # nih_command_parser inherently leaks the internal state when --help or |
| # other immediate-exit is used |
| { |
| nih-command-parser |
| Memcheck:Leak |
| fun:malloc |
| fun:realloc |
| fun:_test_realloc |
| fun:_test_malloc |
| fun:nih_alloc |
| fun:nih_command_join |
| fun:nih_command_parser |
| } |
| |
| |
| # nih_option_parser also inherently leaks its internal state in the same |
| # situations |
| { |
| nih-option-parser |
| Memcheck:Leak |
| fun:realloc |
| fun:_test_realloc |
| fun:nih_realloc |
| fun:nih_str_array_addp |
| fun:nih_str_array_add |
| fun:nih_option_parser |
| } |
| { |
| nih-option-parser |
| Memcheck:Leak |
| fun:malloc |
| fun:nih_alloc_ref_new |
| fun:nih_ref |
| fun:nih_str_array_addp |
| fun:nih_str_array_add |
| fun:nih_option_parser |
| } |
| |
| |
| # this error test is expected to leak the context, because it aborts |
| # in a child |
| { |
| nih-error-context-test |
| Memcheck:Leak |
| fun:malloc |
| fun:nih_alloc |
| fun:nih_error_push_context |
| fun:test_pop_context |
| } |
| { |
| nih-error-context-test |
| Memcheck:Leak |
| fun:malloc |
| fun:realloc |
| fun:_test_realloc |
| fun:_test_malloc |
| fun:nih_alloc |
| fun:nih_error_push_context |
| fun:test_pop_context |
| } |