# Valgrind --tool=exp-sgcheck

**URL:** <https://root-forum.cern.ch/t/valgrind-tool-exp-sgcheck/21044>\
**Category:** General Chat\
**Created:** [April 27, 2016, 7:46pm UTC](https://root-forum.cern.ch/t/valgrind-tool-exp-sgcheck/21044 "2016-04-27T19:46:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [January 2, 2018, 3:36pm UTC](https://root-forum.cern.ch/t/valgrind-tool-exp-sgcheck/21044/2 "2018-01-02T15:36:01Z")

</div>

This is Ubuntu 14.04.5 LTS / x86\_64 / g++ 4.8.4, Ubuntu 16.04.3 LTS / x86\_64 / g++ 5.4.0 and the current [Valgrind git head (i.e. valgrind-3.14.0.GIT)](http://www.valgrind.org/downloads/repository.html) here …

It seems that the problem reported in the first post above is no longer present and one can now run ["valgrind --tool=exp-sgcheck” with ROOT related macros and executables](https://root-forum.cern.ch/t/segmentation-fault-depending-on-linux-distribution/18020/6). One just needs to make sure that any source code, which one wants to analyse (i.e. a ROOT macro or a standalone executable), is compiled in debug mode (i.e. with debug symbols).

Unfortunately, currently, [“valgrind --tool=exp-sgcheck”](https://root-forum.cern.ch/t/segmentation-fault-depending-on-linux-distribution/18020/6) is not really a replacement for the [AddressSanitizer memory error detector](https://root-forum.cern.ch/t/addresssanitizer-memory-error-detector/21046). Not only it is much, much slower but, [it can also fail to detect and report “stack smashing” problems](https://root-forum.cern.ch/t/segmentation-violation-in-simulation-particles-code/27382/8).

---

_[View the full topic](https://root-forum.cern.ch/t/valgrind-tool-exp-sgcheck/21044)._
