sherpa is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" (/hepforge/svn/sherpa does not appear to be a Subversion repository.). Look in the Trac log for more information.
Modify

Opened 9 years ago

Closed 9 years ago

#342 closed defect (fixed)

segfault in IO_Handler::ArrayInput

Reported by: dkalinkin@bnl.gov Owned by: support@sherpa-mc.de
Priority: major Milestone: rel-2.2.0
Component: Unknown Version: 2.1.1
Keywords: OSX, libc++, segfault Cc:

Description

I get following stack trace:

  * frame #0: 0x0000000101a4b609 libToolsOrg.0.dylib`std::__1::complex<double>* ATOOLS::IO_Handler::ArrayInput<std::__1::complex<double> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int) [inlined] std::__1::__wrap_iter<char*> std::__1::find<std::__1::__wrap_iter<char*>, char>(__first=(item = <read memory from 0x117600000 failed (0 of 1 bytes read)>), __last=(item = '}'), __value_=0x0000000117535d30) + 120 at algorithm:846
    frame #1: 0x0000000101a4b591 libToolsOrg.0.dylib`std::__1::complex<double>* ATOOLS::IO_Handler::ArrayInput<std::__1::complex<double> >(this=0x00007fff5fbf6270, name=<unavailable>, nx=1) + 10593 at IO_Handler.C:180
    frame #2: 0x0000000101a4cdd2 libToolsOrg.0.dylib`std::__1::complex<double>** ATOOLS::IO_Handler::MatrixInput<std::__1::complex<double> >(this=0x00007fff5fbf6270, name=<unavailable>, nx=1, ny=1) + 4802 at IO_Handler.C:226
    frame #3: 0x000000010060228a libAmplitude.0.dylib`AMEGIC::CFColor::CFColor(this=0x000000011753d550, N=4, first=0x000000011753aed0, fl=0x00000001175338c0, emit='l', spect='i', pID=std::__1::string at 0x00007fff5fbf6770, force=<unavailable>) + 1162 at CFColor.C:52

The execution goes as follows:

1. getline() call at line 132 of IO_Handler.C reads line that looks like "{(0.333333333333333,-0)}}"
2. find(sit1,send,m_seps[i]); gets called at line 180 with (sit1 == send+1) what leads to segfault.

Attachments (1)

sherpa_OSX_fix.patch (457 bytes) - added by anonymous 9 years ago.
workaround

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by anonymous

Attachment: sherpa_OSX_fix.patch added

workaround

comment:1 Changed 9 years ago by Stefan Hoeche

Resolution: fixed
Status: newclosed

Hi Dmitry,

thanks for reporting (and fixing) this bug. We'll include the change you proposed in the next public version.

Cheers Stefan

(trunk r25579)

Modify Ticket

Change Properties
Action
as closed The owner will remain support@sherpa-mc.de.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.