diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-25 04:38:58 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-25 04:40:27 -0800 |
commit | f86dbda480d70a0b34e4ec238a5917a206b4e402 (patch) | |
tree | a81fad3df845a19ecb81b79dac36005d8e210488 /crawl-ref/source/misc | |
parent | 64cedc8717dd2342af7dfce393e2aed02315f1ba (diff) | |
download | crawl-ref-f86dbda480d70a0b34e4ec238a5917a206b4e402.tar.gz crawl-ref-f86dbda480d70a0b34e4ec238a5917a206b4e402.zip |
Quiet save-and-quit Valgrind leak warnings
Split save_game() code which allocates std::string's on the stack out
into seperate functions, so they'll go out of scope and be free'd before
end() is called, thus getting rid of the spurious complaints Valgrind
gives.
Diffstat (limited to 'crawl-ref/source/misc')
-rw-r--r-- | crawl-ref/source/misc/valgrind-suppress.txt | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/crawl-ref/source/misc/valgrind-suppress.txt b/crawl-ref/source/misc/valgrind-suppress.txt index 0eb75988a4..6856eb4ae6 100644 --- a/crawl-ref/source/misc/valgrind-suppress.txt +++ b/crawl-ref/source/misc/valgrind-suppress.txt @@ -1,39 +1,3 @@ -# stashFile in save_game() never gets freed since the process exits -# before save_game() returns. Wildcards at start and end of function -# names since they get mangled by the C++ compiler and mecheck goes -# by the mangled names. -# -# Also, the first "obj:*" is for the new() operator, which gets mangled -# in the valgrind library, and might be mangled differently in different -# version of valgrind. -# -# NOTE: The number of copies of "obj:*libstdc++*" might need to be changed -# for different versions of the C++ library. -{ - save_game_savedir_leak - Memcheck:Leak - obj:* - obj:*libstdc++* - obj:*libstdc++* - obj:*libstdc++* - obj:*libstdc++* - fun:*get_savedir_filename* - fun:*save_game* -} - -# Not sure what causes escape_path_spaces() in save_game() to leak, but -# since we're going to be exiting right away it doesn't really matter. -{ - save_game_escape_path_leak - Memcheck:Leak - obj:* - obj:*libstdc++* - obj:*libstdc++* - obj:*libstdc++* - fun:*escape_path_spaces* - fun:*save_game* -} - # The error variable in end() is stuff.cc never gets freed since # exit() is called before end() returns. See above suppression for more # notes |