oleksandr-san / cpp-btree

Automatically exported from code.google.com/p/cpp-btree
Apache License 2.0
0 stars 0 forks source link

Crash on test #21

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Compile sources

2. Run included test

What is the expected output? What do you see instead?
The test will crash.

What version of the product are you using? On what operating system?

cpp-btree 1.0.1 on MacOS X 10.7.5 , i686-apple-darwin11-llvm-g++-4.2 

Please provide any additional information below.

Similar crash will happen if I load with some values and call clear method or 
assign empty btree to full btree.

Output of the debugger is:

This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared 
libraries ...... done

(gdb) run
Starting program: /Users/voicegroup/Documents/prog/btree/bin/btree_test 
Reading symbols for shared libraries +++++......................... done
Running main() from gtest_main.cc
[==========] Running 52 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 52 tests from Btree
[ RUN      ] Btree.set_int32_32
    sorted:     fullness=1.00  overhead=6.03  bytes-per-value=10.03

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000080
btree::btree<btree::btree_set_params<int, std::less<int>, std::allocator<int>, 
32> >::assign (this=0x7fff5fbff0a8, x=@0x7fff5fbff758) at btree_test.cc:1864
Line number 1864 out of range; btree_test.cc has 270 lines.
(gdb) bt
#0  btree::btree<btree::btree_set_params<int, std::less<int>, 
std::allocator<int>, 32> >::assign (this=0x7fff5fbff0a8, x=@0x7fff5fbff758) at 
btree_test.cc:1864
#1  0x0000000100072d06 in btree::base_checker<btree::btree_set<int, 
std::less<int>, std::allocator<int>, 32>, std::set<int, std::less<int>, 
std::allocator<int> > >::base_checker (this=0x7fff5fbff0a8, x=@0x7fff5fbff758) 
at btree.h:1746
#2  0x00000001001d4549 in 
btree::DoTest<btree::unique_checker<btree::btree_set<int, std::less<int>, 
std::allocator<int>, 32>, std::set<int, std::less<int>, std::allocator<int> > 
>, int> (name=0x7fff5fbff730 "???_?", b=0x7fff5fbff730, values=@0x7fff5fbff730) 
at btree_test.h:412
#3  0x00000001003a2aba in btree::BtreeTest<btree::btree_set<int, 
std::less<int>, std::allocator<int>, 32>, std::set<int, std::less<int>, 
std::allocator<int> > > () at btree_test.h:810
#4  0x00000001000034b0 in TestBody (this=0x1004764f6) at btree_test.cc:27
#5  0x00000001006c7357 in 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> 
() at /Users/voicegroup/Documents/prog/btree/gtest-1.7.0/src/gtest.cc:2114
#6  0x00000001006c7357 in 
testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> 
(object=0x100805960, location=0x1006d6233 "the test body") at gtest-all.cc:1864
#7  0x00000001006bdc48 in testing::Test::Run (this=0x100805960) at gtest.cc:2151
#8  0x00000001006bfe3a in testing::TestInfo::Run (this=0x7fff5fbff920) at 
gtest.cc:2326
#9  0x00000001006bffd3 in testing::TestCase::Run (this=0x100801900) at 
gtest.cc:2444
#10 0x00000001006bd267 in testing::internal::UnitTestImpl::RunAllTests 
(this=0x100801600) at gtest.cc:4315
#11 0x00000001006c6ed7 in 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::Uni
tTestImpl, bool> () at 
/Users/voicegroup/Documents/prog/btree/gtest-1.7.0/src/gtest.cc:2114
#12 0x00000001006c6ed7 in 
testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTe
stImpl, bool> (object=0x100801600, location=0x1006d5f80 "auxiliary test code 
(environments or event listeners)") at gtest-all.cc:1864
#13 0x00000001006bcee8 in testing::UnitTest::Run (this=0x1006e2680) at 
gtest.cc:3929
#14 0x00000001006a4e24 in main (argc=1, argv=0x7fff5fbff758) at gtest_main.cc:37

Original issue reported on code.google.com by dhla...@gmail.com on 27 Sep 2013 at 10:17