diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-02-17 22:39:06 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2015-02-17 22:39:06 +0100 |
commit | 2e8efb58aa7edf7aa07de215fefd1a33c0466cda (patch) | |
tree | 693a78457c43e4e6e6bdb0268a05ee4d3c642adf /run-ws | |
parent | bf9521263ecbe1bd33bbc89a05073ca5680f327c (diff) | |
download | wireshark-notes-2e8efb58aa7edf7aa07de215fefd1a33c0466cda.tar.gz |
run-ws: set ASAN options
Saves myself from typing another gdb wrapper that sets ASAN_OPTIONS and
G_SLICE.
https://code.google.com/p/address-sanitizer/wiki/Flags
https://developer.gnome.org/glib/unstable/glib-running.html
Diffstat (limited to 'run-ws')
-rwxr-xr-x | run-ws | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -52,6 +52,20 @@ fi [ -z "$SSLDEBUG" ] || set -- -o ssl.debug_file:"$SSLDEBUG" "$@" +# Set AddressSanitizer options if not already +if [ -z "$ASAN_OPTIONS" ]; then + # Abort so it can be caught by gdb + ASAN_OPTIONS=abort_on_error=1 + # Strip source path (assume /tmp/wireshark/) + ASAN_OPTIONS+=strip_path_prefix=/tmp/wireshark/ + export ASAN_OPTIONS +fi + +# For ASAN, disable slice allocator and use g_malloc directly. +if [ -z "$G_SLICE" ]; then + export G_SLICE=always-malloc +fi + "${DEBUGGER[@]}" \ "$WIRESHARK" -r "$CAPTFILE" \ -o http.ssl.port:443,4430-4433 \ |