[Commotion-admin] [commotiond] co_set_str causes segfault in size 32 tree (#90)

gradyoti notifications at github.com
Mon Feb 10 19:08:34 UTC 2014


On size 32 tree when calling co_tree_set_str
Does not occur with size 16.

Specific input:
  TestString1 = co_str8_create("1TESTVALUE1", 12, 0);

  ret = co_tree_insert(Tree32, "1TESTKEY1", 9, TestString1);
  ASSERT_EQ(1, ret);
     
  ret = co_tree_set_str(Tree32, "1TESTKEY1", 9, "REPLACESTRING", 8);
  ASSERT_EQ(1, ret);


Valgrind output:
==8934== Process terminating with default action of signal 11 (SIGSEGV)
==8934==  Access not within mapped region at address 0x15
==8934==    at 0x4C2E893: memcpy at GLIBC_2.2.5 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8934==    by 0x4E4BF12: _co_node_set_str (tree.c:364)
==8934==    by 0x4E4C3A6: co_tree_set_str (tree.c:403)
==8934==    by 0x4383E5: TreeTest::UpdateObj() (tree.cpp:173)
==8934==    by 0x438791: TreeTest_TreeUpdateTest_Test::TestBody() (tree.cpp:192)
==8934==    by 0x45DD87: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/gj/src/commotiond/build/tests/commotion_test)
==8934==    by 0x458F77: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/gj/src/commotiond/build/tests/commotion_test)
==8934==    by 0x440304: testing::Test::Run() (in /home/gj/src/commotiond/build/tests/commotion_test)
==8934==    by 0x440AE1: testing::TestInfo::Run() (in /home/gj/src/commotiond/build/tests/commotion_test)
==8934==    by 0x44117B: testing::TestCase::Run() (in /home/gj/src/commotiond/build/tests/commotion_test)
==8934==    by 0x447941: testing::internal::UnitTestImpl::RunAllTests() (in /home/gj/src/commotiond/build/tests/commotion_test)
==8934==    by 0x45F165: bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (in /home/gj/src/commotiond/build/tests/commotion_test)
==8934==  If you believe this happened as a result of a stack
==8934==  overflow in your program's main thread (unlikely but
==8934==  possible), you can try to increase the size of the
==8934==  main thread stack using the --main-stacksize= flag.
==8934==  The main thread stack size used in this run was 8388608.


---
Reply to this email directly or view it on GitHub:
https://github.com/opentechinstitute/commotiond/issues/90
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-admin/attachments/20140210/3d405c7c/attachment.html>


More information about the Commotion-admin mailing list