Hi Neil,
that looks as if there is something wrong with the low-level
implementations of the ostrstream class. We have not seen this on any
other platform. Have you tried a simple test program that only
implements a system call and the ostrstream way of creating it? It
should be easy to replace the ostrstream by direct string
manipulations, e.g.
string tmpstr = BET_path + string(" ") + Mean_fname + string(" ") +
BET_outputfname + string(" ") + BET_optarg + string(" > /dev/null ");
system(tmpstr.c_str());
does that work for you?
cheers
Christian
On 10 Sep 2007, at 07:33, Neil Killeen wrote:
> still hoping for some insights !
>
> cheers
> Neil
>
> On Tue, 4 Sep 2007 05:33:41 +0100, Neil Killeen
> <[log in to unmask]> wrote:
>
>> Hi
>>
>> the last (I think) of my Intel build issues is in Melodic.
>>
>>
>> 1. It fails the feeds test with a run-time error
>>
>> *** glibc detected *** double free or corruption (out):
>> 0x6000000000063e20 ***
>>
>>
>>
>> 2. All shared libraries are being picked up ok
>>
>> nkilleen@soma:~/dmf/software/fsl/4.0/intel/bin> ldd melodic
>> linux-gate.so.1 => (0xa000000000000000)
>> libcprts.so.6 => /opt/intel/cc/9.0/lib/libcprts.so.6
>> (0x2000000000044000)
>> libunwind.so.6 => /opt/intel/cc/9.0/lib/libunwind.so.6
>> (0x2000000000188000)
>> libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x20000000001d4000)
>> libimf.so.6 => /opt/intel/cc/9.0/lib/libimf.so.6
>> (0x2000000000348000)
>> libm.so.6.1 => /lib/tls/libm.so.6.1 (0x20000000005dc000)
>> libpng.so.3 => /usr/lib/libpng.so.3 (0x2000000000690000)
>> libz.so.1 => /lib/libz.so.1 (0x20000000006f0000)
>> libipr.so.6 => /opt/intel/cc/9.0/lib/libipr.so.6
>> (0x2000000000728000)
>> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x200000000073c000)
>> libcxaguard.so.6 => /opt/intel/cc/9.0/lib/libcxaguard.so.6
>> (0x200000000076c000)
>> libc.so.6.1 => /lib/tls/libc.so.6.1 (0x2000000000780000)
>> libcxa.so.6 => /opt/intel/cc/9.0/lib/libcxa.so.6
>> (0x20000000009ac000)
>> /lib/ld-linux-ia64.so.2 (0x2000000000000000)
>>
>>
>>
>> 3. Googling for this bug suggests it is triggered by
>> a coding error (deleting non-existent pointer or deleting
>> something not allocated with new)
>>
>>
>> 4. I rebuilt the Melodic module with -O0 -debug and ran
>> the debugger to see where exactly it is failing. With
>> this optimization level I get a segv instead of the glibc
>> error:
>>
>>
>> Starting program: /store/users/nkilleen/software/fsl/4.0/intel/bin/
>> melodic
>> -i /store/users/nkilleen/software/fsl/4.0/feeds/data/fmri -o
>> /store/users/nkilleen/software/fsl/4.0/feeds/results/fmri.ica --tr=3
>> melodic(30249): unaligned access to 0x60000fffffff6777,
>> ip=0x4000000000045c30
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x4000000000045c31 in std::basic_streambuf<char,
>> std::char_traits<char>
>>> ::_Pnavail (this=0x60000fffffff672f) at streambuf:342
>> 342 return (*_IPnext != NULL ? *_IPlast -
>> *_IPnext : 0);
>>
>>
>>
>>> where
>>
>>
>>
>> #0 0x4000000000045c31 in std::basic_streambuf<char,
>> std::char_traits<char>
>>> ::_Pnavail (this=0x60000fffffff672f) at streambuf:342
>> #1 0x4000000000044820 in std::basic_streambuf<char,
>> std::char_traits<char>
>>> ::sputc (this=0x60000fffffff672f, _Ch=104 'h') at streambuf:144
>> #2 0x4000000000081bd0 in std::operator<< <char,
>> std::char_traits<char>,
>> std::allocator<char> > () at string:650
>> #3 0x400000000015d4b0 in Melodic::MelodicData::create_mask () at
> meldata.cc:813
>> #4 0x400000000015a120 in Melodic::MelodicData::setup_misc
>> (this=0x60000fffffff8540) at meldata.cc:385
>> #5 0x40000000001450d0 in Melodic::MelodicData::setup
>> (this=0x60000fffffff8540) at meldata.cc:243
>> #6 0x40000000001f8590 in main_LEH_966 () at melodic.cc:144
>>
>>
>>
>> 5. So it is failing in some stream operations. Specifically in
>> MelodicData::create_mask at the line:
>>
>>
>> betosc << BET_path << " " << Mean_fname << " "
>> << BET_outputfname << " "
>> << BET_optarg << " > /dev/null " << '\0';
>>
>>
>>
>>
>> All of the input string variables in this call are being created OK.
>> With some cerr statements we see:
>>
>>
>> Start NEBK
>> BET_path=/home/nkilleen/dmf/software/fsl/4.0/intel/bin/bet
>> Mean_fname=/tmp/file0o2uHp
>> BET_outputfname=/tmp/file0o2uHp_brain
>> BET_optarg=-m -f 0.4
>> Mask_fname=/tmp/file0o2uHp_brain_mask
>> End NEBK
>>
>>
>>
>>
>> 7. So there appears to be something illegal in the stream operator
>> call.
>> I tried various work arounds but didn't get it to work. I note
>> that the
>> operator line fails regardless of how many string arguments I supply.
>> E.g.
>>
>> betosc << BET_path << ends;
>>
>>
>> fails too. The ostrstream constructor looks legal to me.
>>
>>
>>
>>
>> regards
>> Neil
>> =====================================================================
>> ===
|