diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-08-01 09:53:47 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-08-01 09:53:47 +0200 |
commit | 9262720a65e754942f1a51bde4871575c3a5457c (patch) | |
tree | 4ea5bc2645a7a581bbfe171c7de4c28cc5879e1f /doc/en | |
parent | 26085575d5907922d14fe2aeeac34fd4583334fb (diff) | |
download | weechat-9262720a65e754942f1a51bde4871575c3a5457c.zip |
doc: add instructions to build WeeChat with address sanitizer (user's guide)
Diffstat (limited to 'doc/en')
-rw-r--r-- | doc/en/weechat_user.en.adoc | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc index 0c5f908ce..5e70968e9 100644 --- a/doc/en/weechat_user.en.adoc +++ b/doc/en/weechat_user.en.adoc @@ -375,12 +375,14 @@ Then follow instructions for source package (see If you experienced crashes, or if you want to report any future WeeChat crash, you have to: -* Compile it with debug info (or install binary package with debug info). +* Compile with: +** debug info (or install binary package with debug info), +** address sanitizer (optional). * Enable _core_ files on your system. * Install gdb. -[[debug_info]] -==== Debug info +[[build_debug]] +==== Build with debug options If you're compiling with CMake: @@ -388,6 +390,17 @@ If you're compiling with CMake: $ cmake .. -DCMAKE_BUILD_TYPE=Debug ---- +You can additionally enable the address sanitizer, which causes WeeChat to +crash immediately in case of problem: + +---- +$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address +---- + +[WARNING] +You should enable address sanitizer only if you're trying to cause a crash, +this is not recommended in production. + If you installed a binary package, then install package _weechat-dbg_. [[core_files]] |