Crashed ACLiC?

Dear experts,

I attached a test file

On my Mac,

[code]Quans-MacBook-Air:dump qwang$ root -n -l -q -b test.C++
root [0]
Processing test.C++…
Info in TMacOSXSystem::ACLiC: creating shared library /Users/qwang/dump/./test_C.so
Quans-MacBook-Air:dump qwang$ root -n -q -b test.C++

| Welcome to ROOT 6.04/10 http://root.cern.ch |
| © 1995-2014, The ROOT Team |
| Built for macosx64 |
| From tag v6-04-10, 18 November 2015 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/’.q’

root [0]
Processing test.C++…
Info in TMacOSXSystem::ACLiC: creating shared library /Users/qwang/dump/./test_C.so
Quans-MacBook-Air:dump qwang$[/code]

On lxplus:

[code][qwang@lxplus0148 bin]$ root -n -b -q test.C++

| Welcome to ROOT 6.02/13 http://root.cern.ch |
| © 1995-2014, The ROOT Team |
| Built for linuxx8664gcc |
| From tag , 24 June 2015 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/’.q’

root [0]
Processing test.C++…
Info in TUnixSystem::ACLiC: creating shared library /afs/cern.ch/work/q/qwang/cleanroomRun2/Ana/CMSSW_7_5_7_patch2/src/QWAna/QWCumuV3/bin/./test_C.so
[qwang@lxplus0148 bin]$[/code]

No print out at all.
But, if you comment out any two lines of [1…5] on my Mac, any one line of [1…5] on lxplus, everything works fine.
You can see print out like this:

[code][qwang@lxplus0148 bin]$ root -n -b -q test.C++

| Welcome to ROOT 6.02/13 http://root.cern.ch |
| © 1995-2014, The ROOT Team |
| Built for linuxx8664gcc |
| From tag , 24 June 2015 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/’.q’

root [0]
Processing test.C++…
Info in TUnixSystem::ACLiC: creating shared library /afs/cern.ch/work/q/qwang/cleanroomRun2/Ana/CMSSW_7_5_7_patch2/src/QWAna/QWCumuV3/bin/./test_C.so
s1 = 1 s2 = 10 s3 = 10
12
[qwang@lxplus0148 bin]$[/code]

So, my question is, am I reaching some ACLiC limit?

Thanks,
test.C (1.68 KB)

[quote=“Pepe Le Pew”]No error when macro crashes

Raising the stack limit seems working, thanks.
A further question is, why it breaks with [1…5] uncommented out?
All the variables are declared already.
The histograms are on the heap instead of stack by using “new”.
Does this have anything to do with cling?
My code works fine on root5 though.

Cheers,

I guess your compiler is clever enough to notice that you defined something but you did not use it afterwards, so it “purged” it completely.

You should switch to dynamically allocated arrays, e.g:
cplusplus.com -> Multi-Dimensional Arrays