https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=12804

Tomasz Mon <deso...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |deso...@gmail.com

--- Comment #13 from Tomasz Mon <deso...@gmail.com> ---
(In reply to Patrick from comment #5)
> I think it might be loading that once for each ssl packet. 

This is indeed the case on Windows. This triggers the really high memory usage
in hash tables. See 16059 for discussion on the reason why it reloads the file
on each ssl packet. The fix to 16059 significantly reduces the impact of
underlying root cause of this bug.

Simply providing a key/value destory func like:
>+static void free_wmem_file_scope(gpointer data)
>+{
>+    wmem_free(wmem_file_scope(), data);
>+}

and using it to create hash tables in packet-tls-utils.c like:
>    mk_map->session = g_hash_table_new_full(ssl_hash, ssl_equal, 
> free_wmem_file_scope, free_wmem_file_scope);

is not solving the issue as the obsolete entries (that were passed to
free_wmem_file_scope) are interleaved with other allocations that cannot be
freed until the file gets closed.

The solution would be to not use the file scope here, but a standard
g_malloc()/g_free() and provide g_free as the key and value destory notify to
g_hash_table_new_full() (that could be used instead of g_hash_table_new()).

-- 
You are receiving this mail because:
You are watching all bug changes.
___________________________________________________________________________
Sent via:    Wireshark-bugs mailing list <wireshark-bugs@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs
             mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe

Reply via email to