O.K. Thanks (so, you did the same as I usually do -> just in this case I forgot about it completely).
I also tried (“exp-sgcheck” is supposed to deal with “stack and global array overrun” problems):
valgrind --tool=exp-sgcheck --suppressions=root-config --etcdir
/valgrind-root.supp root-config --bindir
/root.exe -l -q canvases_working.cxx++
It seems to me that “exp-sgcheck” completely refuses to work with ROOT (I tried v5-34-00-patches “debug” and 6.06/02 “RelWithDebInfo”) -> it “immediately” exits without running the macro: [code][…]$ valgrind --tool=exp-sgcheck --suppressions=root-config --etcdir
/valgrind-root.supp root-config --bindir
/root.exe -l -q canvases_working.cxx++
==966== exp-sgcheck, a stack and global array overrun detector
==966== NOTE: This is an Experimental-Class Valgrind Tool
==966== Copyright © 2003-2015, and GNU GPL’d, by OpenWorks Ltd et al.
==966== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
==966== Command: /opt/ROOT/debug/v5-34-00-patches/bin/root.exe -l -q canvases_working.cxx++
==966==
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
–966-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0x93
exp-sgcheck: sg_main.c:559 (add_blocks_to_StackTree): Assertion ‘!already_present’ failed.
host stacktrace:
==966== at 0x38013B88: show_sched_status_wrk (m_libcassert.c:343)
==966== by 0x38013C94: report_and_quit (m_libcassert.c:415)
==966== by 0x38013E21: vgPlain_assert_fail (m_libcassert.c:481)
==966== by 0x3800A980: add_blocks_to_StackTree (sg_main.c:559)
==966== by 0x3800B8A9: shadowStack_new_frame.isra.22 (sg_main.c:1883)
==966== by 0x805092FE9: ???
==966== by 0x804072F2F: ???
==966== by 0x80206456F: ???
==966== by 0x61E757A: __nscd_get_mapping (nscd_helper.c:286)
==966== by 0x80206456F: ???
==966== by 0x1BFF: ???
sched status:
running_tid=1
Thread 1: status = VgTs_Runnable (lwpid 966)
==966== at 0x61E75B8: __nscd_get_mapping (nscd_helper.c:293)
==966== by 0x61E7ABB: __nscd_get_map_ref (nscd_helper.c:443)
==966== by 0x61E4207: nscd_getpw_r (nscd_getpw_r.c:95)
==966== by 0x61E4645: __nscd_getpwuid_r (nscd_getpw_r.c:63)
==966== by 0x617538F: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:196)
==966== by 0x6174B85: getpwuid (getXXbyYY.c:116)
==966== by 0x517A11C: TUnixSystem::UnixHomedirectory(char const*) (TUnixSystem.cxx:4032)
==966== by 0x5173FCF: TUnixSystem::HomeDirectory(char const*) (TUnixSystem.cxx:1509)
==966== by 0x50BDD8C: TROOT::InitSystem() (TROOT.cxx:1434)
==966== by 0x50B8960: TROOT::TROOT(char const*, char const*, void (**)()) (TROOT.cxx:298)
==966== by 0x50B7EEE: ROOT::GetROOT() (TROOT.cxx:206)
==966== by 0x50C0334: __static_initialization_and_destruction_0(int, int) (TROOT.cxx:215)
==966== by 0x50C037A: _GLOBAL__sub_I_TROOT.cxx (TROOT.cxx:2236)
==966== by 0x4010139: call_init.part.0 (dl-init.c:78)
==966== by 0x4010222: _dl_init (dl-init.c:36)
==966== by 0x4001309: ??? (in /lib/x86_64-linux-gnu/ld-2.19.so)
==966== by 0x3: ???
==966== by 0xFFEFFFE1A: ???
==966== by 0xFFEFFFE48: ???
==966== by 0xFFEFFFE4B: ???
==966== by 0xFFEFFFE4E: ???
Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there’s a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.
If that doesn’t help, please report this bug to: www.valgrind.org
In the bug report, send all the above text, the valgrind
version, and what OS and version you are using. Thanks.[/code] Actually, it looks like it is sufficient to #include “TObject.h” (or anything that inherits from TObject) and the “exp-sgcheck” is dead (you do not need to create any object, just #include the header file).
On the other hand, if I just #include “TString.h” then “exp-sgcheck” works fine (does not need any ROOT libraries). However, as soon as I add “TString s;” in the source code, then it dies (needs libCore and libCint ROOT 5 libraries or just libCore in ROOT 6).
So, the problem is somehow related to ROOT libraries.
I tried Valgrind-3.10.1 (the default version on Ubuntu 14.04.4 LTS), Valgrind 3.11.0 (the current release) and the current svn trunk, and in all cases I get the same problem.