Re: debugging a seg fault

From: John <idarraga_at_cern.ch>
Date: Thu, 6 Nov 2008 10:59:21 -0500


Hello Roger,

Sorry the actual size is (you are doing Int_t)

~104554*48*4 bytes = 20 074 368 bytes

still too much ... I had mistaken the size of Int_t (is 4 bytes not 8).

John Idarraga
UMontreal

Roger Mason wrote:
> Hi,
>
> I'm testing a program that reads a rootfile and makes histograms from
> a tree. The program fails with a seg fault at the marked line:
>
> const Long64_t nenergies = v1.size();
> #ifdef DEBUG
> cout << "Nenergies = " << nenergies << " at " << "line " << __LINE__ << endl;
> #endif
>
> Int_t word[nenergies][48]; // <---------- SEG FAULT
> #ifdef DEBUG
> cout << "Line = " << __LINE__ << endl;
> #endif
>
> The value of nenergies at that point is 104554, much smaller than the
> maximum size of a Long64_t.
>
> I'd apperciate suggestions on how to debug this further.
>
> Thanks,
> Roger
>
> ROOT 5.20/00 (trunk_at_24524, Oct 01 2008, 15:00:00 on linux)
>
Received on Thu Nov 06 2008 - 17:01:02 CET

This archive was generated by hypermail 2.2.0 : Thu Nov 06 2008 - 23:50:02 CET