# Getting a useful crash dump when an exception is thrown

**URL:** <https://root-forum.cern.ch/t/getting-a-useful-crash-dump-when-an-exception-is-thrown/28165>\
**Category:** ROOT\
**Created:** [March 3, 2018, 6:15pm UTC](https://root-forum.cern.ch/t/getting-a-useful-crash-dump-when-an-exception-is-thrown/28165 "2018-03-03T18:15:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [March 3, 2018, 6:22pm UTC](https://root-forum.cern.ch/t/getting-a-useful-crash-dump-when-an-exception-is-thrown/28165/2 "2018-03-03T18:22:02Z")

</div>

> [@Segmentation Fault depending on linux distribution](https://root-forum.cern.ch/t/segmentation-fault-depending-on-linux-distribution/18020/6):
>
> Try something like (note: some [Valgrind](http://valgrind.org/) functionality requires that the source code, that you want to analyse, is compiled with debug symbols): valgrind --tool=memcheck --leak-check=full [--show-reachable=yes] [--track-origins=yes] [--num-callers=50] [--vgdb=full] --suppressions=`root-config --etcdir`/valgrind-root.supp `root-config --bindir`/root.exe -l -q 'YourMacro.cxx[++g][(Any, Parameters, You, Need)]' valgrind --tool=exp-sgcheck [--num-callers=50] [--vgdb=full] --suppressions=`root-config…

> [@AddressSanitizer memory error detector](https://root-forum.cern.ch/t/addresssanitizer-memory-error-detector/21046):
>
> The default [valgrind’s “memcheck” memory error detector](http://valgrind.org/docs/manual/mc-manual.html) will not find various {stack,global}-buffer overflow bugs. [Valgrind](http://valgrind.org/) does provide a dedicated complementary [“exp-sgcheck” experimental stack and global array overrun detector](http://valgrind.org/docs/manual/sg-manual.html) but, for the time being, [it does not work, as soon as ROOT related libraries are used](https://root-forum.cern.ch/t/valgrind-tool-exp-sgcheck/21044) [and it seems that it is possible to use it](https://root-forum.cern.ch/t/valgrind-tool-exp-sgcheck/21044/2). On the other hand, gcc 4.8 and newer compilers provide their own [AddressSanitizer (a.k.a. ASan) fast memory error detector](https://github.com/google/sanitizers/wiki/AddressSanitizer) (note: you may n…

---

_[View the full topic](https://root-forum.cern.ch/t/getting-a-useful-crash-dump-when-an-exception-is-thrown/28165)._
