Re: an error of CustomReAlloc2

From: Yongzhao Zhou (Yongzhao.Zhou@lnf.infn.it)
Date: Fri Mar 03 2000 - 16:17:06 MET


Hi, Fons,
I have gotten successful without -lNew and can not get successful put the
-lNew on the first of all libs of linking statement.
Thanks so lot.
Best Regards,
ZYZ


------
Yongzhao Zhou, KLOE, LNF, INFN, Italy
Tel:39-06-94032696 Fax:39-06-94032427


On Fri, 3 Mar 2000, Fons Rademakers wrote:

> Hi Christoph and Yongzhao,
> 
>   you must make sure that the -lNew is the first of all libs (also non
> ROOT libs) on the linking statement. If this still fails just don't link
> with -lNew. The problem you see is due to some space being allocated using
> the standard new mechanism before the ROOT version in libNew has been loaded.
> Then later during some delete or ReAlloc operation the ROOT version is used
> and it does not find the expected memory marker that the ROOT new would
> put there, hence error. By putting -lNew as first lib it should be loaded
> before any other memory is allocated and there should be no problems.
> 
> Cheers, Fons.
> 
> 
> 
> 
> Christoph Plettner wrote:
> > 
> > Hi!
> > 
> > I have had the same experience or problem on AIX4.3 with xlC  moving from
> > root v2.20 to v2.23. The error occured as soon as I linked my root program
> > together with classes not being in the ROOT I/O. Especially those
> > classes with pointers to arrays of doubles or ints as private members
> > created problems as soon as I tried to touch a TTree later. I have
> > rewritten these classes being now in the  ROOT I/O with rootcint producing
> > shared libraries and since then everything works fine.
> > 
> > So long
> > 
> > Christoph
> > 
> > ------------------------------------------------------------------------------
> > Christoph Plettner
> > plettner@pktw09.phy.tu-dresden.de
> > Institut fuer Kern- und Teilchenphysik      Tel.: 0351/463-3905
> > Technische Universitaet Dresden             ASB, Raum E9
> > Zellescher Weg 19
> > D-01069 Dresden
> > ------------------------------------------------------------------------------
> > 
> > On Fri, 3 Mar 2000, Yongzhao Zhou wrote:
> > 
> > > Hi, Rooters,
> > > I have a pregram to try to read a file as
> > >
> > >   // --- Open temporary file
> > >     f = new TFile(kSystem->GetPidFile(),"RECREATE");
> > >   // --- Creating Tree
> > >     GAStree    = new TTree("GAS Tree",    DrawTitle);
> > >   // --- Creating Branch
> > >     GAStree->Branch("Ntuple", &event,
> > >     "t:p1:p2:p3:p4:p5:p6:p7:p8:p9:p10:p11:p12:p13:p14:p15:p16:p17:p18");
> > >   // --- the open and read a file GAS
> > >
> > > It works on ROOT v2.20 but does not work on ROOT v2.23/12 on AIX 4.3 even
> > > it has been passed by compiling and linking. The system always gave the
> > > messages when the program touchs the statement of creating Branch as
> > > above:
> > >
> > >    <CustomReAlloc2>: passed oldsize 64, should be 0
> > >    Fatal in <CustomReAlloc2>: storage area overwritten
> > >    aborting
> > >
> > > What is wrong here? Thanks for someone give me a hand.
> > > Best,
> > > ZYZ
> > >
> > > ------
> > > Yongzhao Zhou, KLOE, LNF, INFN, Italy
> > > Tel:39-06-94032696 Fax:39-06-94032427
> > >
> > >
> > >
> 
> -- 
> Org:    CERN, European Laboratory for Particle Physics.
> Mail:   1211 Geneve 23, Switzerland
> E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
> WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910
> 



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