bpls crash
Created by: germasch
To reproduce, you can add this to TestADIOSInterface.cpp
:
TEST_F(ADIOS2_CXX11_API_IO, StreamingWrite)
{
adios2::Engine writer = m_Io.Open("xxx.bp", adios2::Mode::Write);
double x[3];
auto var = m_Io.DefineVariable<double>("x", {3}, {0}, {3});
for (int step = 0; step < 3; step++) {
x[0] = 10 + step;
x[1] = 20 + step;
x[2] = 30 + step;
writer.BeginStep();
if (step > 0) {
writer.Put(var, x);
}
writer.EndStep();
}
writer.Close();
}
Running bpls on the created file crashes:
[kai@macbook build (pr/tostring2 *)]$ bin/bpls xxx.bp
AddressSanitizer:DEADLYSIGNAL
=================================================================
==80280==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000101ca1bca bp 0x7ffeee02c5e0 sp 0x7ffeee02c4d0 T0)
==80280==The signal is caused by a READ memory access.
==80280==Hint: address points to the zero page.
#0 0x101ca1bc9 in std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > adios2::utils::get_global_array_signature<double>(adios2::core::Engine*, adios2::core::IO*, adios2::core::Variable<double>*) bpls.cpp:2589
#1 0x101c54400 in int adios2::utils::printVariableInfo<double>(adios2::core::Engine*, adios2::core::IO*, adios2::core::Variable<double>*) bpls.cpp:761
#2 0x101c461a0 in adios2::utils::doList_vars(adios2::core::Engine*, adios2::core::IO*) bpls.cpp:727
#3 0x101c38a2a in adios2::utils::doList(char const*) bpls.cpp:1233
#4 0x101c36478 in adios2::utils::bplsMain(int, char**) bpls.cpp:399
#5 0x101c5c008 in main bpls.cpp:2925
#6 0x7fff68459014 in start (libdyld.dylib:x86_64+0x1014)
==80280==Register values:
rax = 0x0000000000000000 rbx = 0x0000000000000000 rcx = 0x0000000000000000 rdx = 0x00007ffeee02c540
rdi = 0x00007ffeee02c260 rsi = 0x00007ffeee02c318 rbp = 0x00007ffeee02c5e0 rsp = 0x00007ffeee02c4d0
r8 = 0x0000000000000110 r9 = 0x0000000104624400 r10 = 0x00000000000000ff r11 = 0x0000000103872dd0
r12 = 0x0000000000000000 r13 = 0x0000000000000000 r14 = 0x0000000000000000 r15 = 0x0000000000000000
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV bpls.cpp:2589 in std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > adios2::utils::get_global_array_signature<double>(adios2::core::Engine*, adios2::core::IO*, adios2::core::Variable<double>*)
==80280==ABORTING
double x 2*[kais-mbp-269:80280] *** Process received signal ***
[kais-mbp-269:80280] Signal: Abort trap: 6 (6)
[kais-mbp-269:80280] Signal code: (0)
[kais-mbp-269:80280] *** End of error message ***
Abort trap: 6