Long array identifiers

rootcint crashes given that you use a long array name (>=160 chars).

An minimal exaple:

#ifndef error_h
#define error_h

#include <TSelector.h>

class error : public TSelector {
public :
   error(TTree * /*tree*/ =0) { }
   virtual ~error() { }




#define error_cxx
#include "error.h"


#ifdef __CINT__
#pragma link C++ class error;

Then, I get the following:

~$ rootcint -v -f error_dict.C -c error.h error_linkdef.h
Segmentation fault

Of course, what one can do is putting a

#if !defined(__CINT__) && !defined(__MAKECINT__) ... #endif
around the long array variables – but rootcint shouldn’t segfault in the first place. Especially because the file with long names is generated automatically (using tree->MakeSelector()) and it is just additional work(*) every time you recreate the file.

(I’m using ROOT 5.14 and 5.18, both segfault)

(*) by the way, I also have to add

#include <string>
#include <vector>   
using std::string;
using std::vector;

to the header file created by MakeSelector().


there are several static buffer sizes in CINT. Rather than adding workarounds or hundreds of buffer size checks we will replace these static sized buffers with dynamic strings in the coming months.

Until then please use one of the workarounds you already found yourself.

Cheers, Axel.

[quote]Especially because the file with long names is generated automatically (using tree->MakeSelector())[/quote]As another work around, could you try to use MakeProxy instead?