Re: [ROOT] ROOT 2.25.01: CINT template bug affecting all STL containers

From: Matthew D. Langston (langston@SLAC.stanford.edu)
Date: Thu Aug 17 2000 - 19:05:29 MEST


Hi Rene,

Thank you for your vote of confidence :-)

I actually already wrote the beginnings of a testsuite and contributed it to
ROOT over a year ago.  If you recall, I couldn't go any further with the
testsuite until two ROOT buglets were fixed, which I reported
(coincidentally?) exactly a year ago yesterday.

I have attached that original e-mail so that perhaps you or someone else on
the ROOT team could revisit these two buglets.  Once they are fixed (or a
workaround is provided), then I could get back to work on the framework for
a ROOT testsuite.  Fixing these two buglets (listed below) are essential for
a testsuite:

1) ROOT must returns error codes to the calling process
2) A mechanism to adjust include search paths (i.e. like a cimpiler "-I"
flag) must exist

Note that the attached email reported 5 buglets, but all of them but the
first two have been fixed.  Incidentally, it is these two buglets which must
be fixed before a proper testsuite can be completely written.  If there are
any known workarounds for these two buglets, please let me know that as
well.

Thank you.

Matt

----- Original Message -----
From: "Rene Brun" <Rene.Brun@cern.ch>
To: <langston@SLAC.Stanford.EDU>
Cc: <roottalk@pcroot.cern.ch>
Sent: Wednesday, August 16, 2000 11:33 PM
Subject: Re: [ROOT] ROOT 2.25.01: CINT template bug affecting all STL
containers


> Hi Matt,
> Being an experienced C++ user with templates, I think you are the ideal
> candidate to provide the test suite you are talking about.
> If you develop it, I will be pleased to add it to our standard Root test
suite.
>
> Rene Brun
>
> Matthew D. Langston wrote:
> >
> > I've come across a CINT bug in ROOT 2.25.01 that affects all STL
> > containers that depend on the "construct" template function (which, to
> > my knowledge, is all STL containers).  The nature of the bug looks like
> > it is an CINT internal compiler error, as CINT can't handle the
> > "construct" template function in "cint/stl/defalloc.h" (line 120).
> >
> > I've attached a small test file (called "test_vector.C") that
> > demonstrates the problem.  The problem does not appear in ROOT 2.24.05
> > (i.e. "test_vector.C" and the rest of my template and STL code runs fine
> > with ROOT 2.24.05).  This is the error I get from ROOT 2.25.01:
> >
> >   root [0] .x test_vector.C
> >   Error: Undeclared variable value FILE:defalloc.h LINE:120
> >   *** Interpreter error recovered ***
> >   root [1]
> >
> > This is the C++ template code (from "cint/stl/defalloc.h) that CINT is
> > having trouble with:
> >
> >   template <class T1, class T2>
> >   inline void construct(T1* p, const T2& value) {
> >       new (p) T1(value);
> >   }
> >
> > Perhaps this is a good time to make another request for a ROOT test
> > suite.  If ROOT had such a test suite, then code like "test_vector.C"
> > could be put into it so that future releases of ROOT don't introduce
> > bugs that were fixed in previous releases.  Perhaps ROOT could start
> > with the gcc/g++ test suite.  Although CINT only promises to support 85%
> > of C++, it would at least let ROOT users know specifically what that 15%
> > of C++ we can't use is.
> >
> > Regards, Matt
> >
> > --
> > Matthew D. Langston
> > SLD, Stanford Linear Accelerator Center
> > langston@SLAC.Stanford.EDU
> >
>
  --------------------------------------------------------------------------
------
> >
> >    Part 1.2       Type: Plain Text (text/plain)
> >               Encoding: 7BIT
>


attached mail follows:


Hello ROOT Team, Here is a small list of five buglets that I was hoping you might eventually fix for us: 1) The `root' command doesn't parse the "-I" flag correctly (or at least the way I expect it to work). This works: $ root -I /foo/bar/baz but this doesn't: $ root -I/foo/bar/baz 2) The cint interpreter doesn't return an error code (i.e. it always succeeds), even if the interpreted script fails. For example: $ cat foo.cxx void foo() { exit( 1 ); } $ root -b -l -n -q foo.cxx [snip] Processing foo.cxx... $ echo $? 0 Even if there are users who depend on this behavior, may I ask that an option be added to cint that enables the propagation of the error code. The absence of a meaningful return code makes it extremely difficult to write ROOT testsuites (I am currently having to parse the output with Expect). 3) The `root' command ignores the "-l" flag to disable the display of the ROOT splash screen. No matter what I try, I can't suppress the ROOT splash screen. 4) ROOT's paths in a `.rootrc' file (e.g. Unix.*.Root.MacroPath) must be absolute - they can't be relative paths. This makes it extremely difficult to write ROOT testsuites. 5) Static data members aren't initialized by the interpreter, even though the initialization is explicit in the implementation (e.g. .cxx) file. Thanks! -- Matthew D. Langston SLD, Stanford Linear Accelerator Center langston@SLAC.Stanford.EDU



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:31 MET