Re: += operator and crash root cint

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Fri, 14 May 2010 09:54:39 -0500


Hi,

 > Any suggestions appreciated.

The best would be to upgrade to v5.26. If this is not possible I recommend that you compile your script using ACLiC.

Cheers,
Philippe.

On 5/14/10 7:44 AM, Venkatesh Kaushik wrote:
> Dear ROOT team,
> a) Apologies if this is already a known/fixed issue, I couldn't find
> any mention of it.
> b) I wanted to compute bin-labels and wrote a small macro (which
> follows) and it
> crashed at the line where I have used a += operator. When I replaced
> it with val = val + 0.5
> all is well and I get the desired output. Any suggestions appreciated.
> Regards,
> Venkat
>
> I am using ROOT that ships with Fink 0.29.10 installation on my Mac OS
> X (10.6.3 snow leopard)
>
> 05:41:37]:Downloads> gcc --version
> i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659)
>
> 05:40:56]:Downloads> root-config --version
> 5.22/00b
>
> macro:
> void test() {
> float val = 0.5;
> for(int i = 0; i < 13; i++) {
> std::cout << val << "\t" << TMath::Log10(val) << std::endl;
> val = val + 0.5; // <-- this works
> // val += 0.5; // <-- ROOT CINT doesn't like this
> }
> }
> ----------------------------
> stack trace:
> Processing test.C...
> 0.5 -0.30103
>
> *** Break *** segmentation violation
> /Users/venkat/Downloads/1813: No such file or directory
> Attaching to process 1813.
> Reading symbols for shared libraries . done
> Reading symbols for shared libraries .......... done
> 0x99586515 in wait4 ()
>
> ========== STACKS OF ALL THREADS ==========
>
> Thread 1 (process 1813):
> #0 0x99586515 in wait4 ()
> #1 0x995f5493 in system$UNIX2003 ()
> #2 0x0010bf8a in TUnixSystem::StackTrace ()
> #3 0x0010f380 in TUnixSystem::DispatchSignals ()
> #4 0x0010f458 in SigHandler ()
> #5 <signal handler called>
> #6 0x0086f880 in G__getexpr ()
> #7 0x00903555 in G__exec_statement ()
> #8 0x009102c9 in G__exec_loop ()
> #9 0x0090c630 in G__exec_statement ()
> #10 0x00847422 in G__exec_tempfile_core ()
> #11 0x00847716 in G__exec_tempfile ()
> #12 0x0091c8d0 in G__process_cmd ()
> #13 0x000fd29b in TCint::ProcessLine ()
> #14 0x000fc56f in TCint::ProcessLineSynch ()
> #15 0x0005eefb in TApplication::ExecuteFile ()
> #16 0x0005c5f5 in TApplication::ProcessLine ()
> #17 0x0113547f in TRint::Run ()
> #18 0x00001abe in main ()
>
Received on Fri May 14 2010 - 16:54:44 CEST

This archive was generated by hypermail 2.2.0 : Fri May 14 2010 - 23:50:01 CEST